mirror of
https://github.com/WMK965/965-R-Learning-Repo.git
synced 2025-04-26 14:03:20 +00:00
Sync Local Changes
This commit is contained in:
parent
8f855b0398
commit
c05892b163
4
.gitignore
vendored
4
.gitignore
vendored
@ -47,3 +47,7 @@ po/*~
|
||||
|
||||
# RStudio Connect folder
|
||||
rsconnect/
|
||||
|
||||
.DS_Store
|
||||
|
||||
.gitignore
|
||||
|
12
exercise/1.R
Normal file
12
exercise/1.R
Normal file
@ -0,0 +1,12 @@
|
||||
age <- c(6, 14, 12, 10)
|
||||
name <- c("Audree", "Andy", "Rose", "Andrew")
|
||||
gender <- c("female", "male", "female", "male")
|
||||
info <- data.frame(age, name, gender)
|
||||
print(info[3, 2])
|
||||
print(info[2:3, ])
|
||||
info <- info[-c(1), ]
|
||||
print(info[7 < info[, 1] & info[, 1] < 13])
|
||||
info[2, 1] <- 8
|
||||
print(summary(info))
|
||||
info$gender <- as.factor(info$gender)
|
||||
print(summary(info))
|
5
samples/1.1.R
Executable file
5
samples/1.1.R
Executable file
@ -0,0 +1,5 @@
|
||||
print(5 + 5)
|
||||
name <- paste("placeholder", readline("Input"), sep = " * ")
|
||||
print(name)
|
||||
number <- sum(as.integer(readline("Num 1")), as.integer(readline("Num 2")))
|
||||
print(number)
|
2
samples/1.2.R
Executable file
2
samples/1.2.R
Executable file
@ -0,0 +1,2 @@
|
||||
sheet1 <- read.table("sheet-example1.csv", sep = ",", header = TRUE)
|
||||
View(sheet1)
|
4
samples/sheet-example1.csv
Executable file
4
samples/sheet-example1.csv
Executable file
@ -0,0 +1,4 @@
|
||||
colume 1, colume 2, colume 3, colume 4
|
||||
row 1, 686, 655, 651
|
||||
row 2, 161, 515, 656
|
||||
row 3, 791, 125, 687
|
|
Loading…
Reference in New Issue
Block a user