this is my code
moh<-read.csv(“wfed proj3.csv”) moh
moh<- as_tibble(moh) moh
summary(moh)
# import the txt file
moh1<-read.table("wfed proj3.txt", sep = "\t",header = TRUE)
moh1
library (tibble)
# convert dataset into tibbles and print
moh1<- as_tibble(moh1)
moh1
#summarize
summary(moh1)
install.packages(“tibble”)
install.packages(“readxl”)
library(tibble)
library(dplyr)
install.packages("xlsx")
library(xlsx)
library(readxl)
# import the xlsx file
moh2<-read_excel("wfed proj3.xlsx")
moh2
# convert dataset into tibbles and print
moh2<- as_tibble(moh2)
moh2
#summarize
summary(moh2)
#2 Import the .csv file from the web
csvwebfile<- read.csv("http://www.personal.psu.edu/dlp/alphaheight_weight_dataset.csv")
csvwebfile
# convert the dataset to tibble, and print
csvwebfile<- tbl_df(csvwebfile)
csvwebfile
# summarize
summary(csvwebfile)
#3 Import the .csv file from the web
csvwebfile2<- read.csv("http://www.personal.psu.edu/dlp/w540/datasets/titanicsurvival.csv")
csvwebfile2
# convert the dataset to tibble, and print
csvwebfile2<- tbl_df(csvwebfile2)
csvwebfile2
# summarize
summary(csvwebfile2)
#4 import the SPSS.sav file from the web
library(foreign)
library(Hmisc)
import<- read.spss("https://cehd.gmu.edu/assets/dimitrovbook/EXAMPLE_23_1.sav",to.data.frame=TRUE)
import