This document is to show the use of readxl function
library(readxl)
getwd()
## [1] "/Users/sanjayfuloria/Desktop/R_Workshop"
my_data <- read_excel("siva.xlsx")
my_data_two <- read.csv("siva.csv")
siva_reg <- lm(Y ~ ., data = my_data_two)
summary(siva_reg)
##
## Call:
## lm(formula = Y ~ ., data = my_data_two)
##
## Residuals:
## Min 1Q Median 3Q Max
## -53.788 -7.753 5.212 16.979 30.598
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 179.778 27.821 6.462 5.85e-06 ***
## X -1.307 1.810 -0.722 0.48
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 24.48 on 17 degrees of freedom
## Multiple R-squared: 0.02975, Adjusted R-squared: -0.02732
## F-statistic: 0.5213 on 1 and 17 DF, p-value: 0.4801