LOAD the data R语言-如何加载数据?

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/kidpea_lau/article/details/82800425

this s the example to load ur data ! 

下面是一个用来加载数据的基本代码以供参考:

#clean workspace and setup working directory
remove(list=ls())
setwd("C:\....")
getwd()

#create a folder and download files
if(!file.exists("./data")){dir.create("./data")}
fileUrl <- "the web url"
download.file(fileUrl,destfile="./data/Dataset.zip")
unzip(zipfile="./data/Dataset.zip",exdir="./data")
path_rf <- file.path("./data" , "data.csv")
files<-list.files(path_rf, recursive=TRUE)
files

猜你喜欢

转载自blog.csdn.net/kidpea_lau/article/details/82800425