1. Load data
GitBook allows you to organize your book into chapters, each chapter is stored in a separate file like this one.
Quickly enter data from keyboard
Col1 <- Scan()
Col2 <- Scan(what=”character”) # specify type
mydata<- data.frame(Col1, Col2)
Or write a table like this (type spaces or tabs as separators).
dd <- read.table(text="
Nazwisko Imie Dochód
Kowalski Jan 23314.3
Nowak Kazimierz 2332.4",
header=TRUE)
Paste from Excel - clipboard
mydata<- read.table(file="clipboard", dec = ",", header=T) # or
mydata<- read.csv(file="clipboard", dec = ",", header=T, sep=”/t”,
stringsAsFactors = FALSE)
attach (mojedane)