Beruflich Dokumente
Kultur Dokumente
Benchmark Datasets
Data Frames
…. table / two-dimensional array-like structure in which each column contains
values of one variable and each row contains one set of values from each
column.
print(emp.data)
Extract
Columns
Add
Column
Tabular Data Creation using DATA FRAMES
The
command data(phones)
will load the data
set phones into
memory.
https://stat.ethz.ch/R-manual/R-devel/library/datasets/html/00Index.html
Importing Dataset
Importing Datasets from External Files
Reading Text Files
Common Issue
Otherwise, it will
generate the error
Performance Evaluation on Reading Data
library(data.table)
start_time <- Sys.time()
DT <- fread("d:\\g.csv")
end_time <- Sys.time()
end_time - start_time
library(Hmisc)
impute(BostonHousing$ptratio, mean) # replace with mean
impute(BostonHousing$ptratio, median) # median
impute(BostonHousing$ptratio, 20) # replace specific number
# or if you want to impute manually
BostonHousing$ptratio[is.na(BostonHousing$ptratio)] <-
mean(BostonHousing$ptratio, na.rm = T) # not run
Prediction Imputation using kNN Algorithm (Package DMwR)
> knnOutput <- knnImputation(dm1)
> anyNA(knnOutput)
[1] FALSE
convert("forconvert.csv", "mtcars.json")
convert("forconvert.csv", "mtcars.xml")
convert("mtcars.json", "mtcars.csv")
Package: rio
convert("mtcars.json", "mtcars.xlsx")
convert("mtcars.json", "mtcars.tsv")
convert("mtcars.json", "mtcars.fwf")
convert("mtcars.json", "mtcars.yml")
Install and Activate Required Packages
install.packages("twitteR", "RCurl", "RJSONIO", "stringr")
library(twitteR)
library(RCurl)
library(RJSONIO)
library(stringr)
Obamacare OR ACA Either "Obamacare" or "ACA" or both; not case sensitive; the OR
operator IS case sensitive.
> library(tidytext)
> sentiments
E-mail : kumargaurav.in@gmail.com
http://www.gauravkumarindia.com