Convert the dataset to a dataframe for analysis.
* Display the commands to convert statex.77 to a dataframe.
* Perform regression and correlation analysis on this dataset.
▪ Show the commands to perform a regression.
Activate state.x77 file through this command:
>data(state) #to activate the hidden statex.77 file
>ls() #to list the files
To convert the matrix to data frame we execute this command:
> sdata <- as.data.frame(state.x77)
> str(sdata)