Sync Local Changes

This commit is contained in:
wmk965 2024-09-12 10:45:12 +08:00
parent 8f855b0398
commit c05892b163
5 changed files with 27 additions and 0 deletions

4
.gitignore vendored
View File

@ -47,3 +47,7 @@ po/*~
# RStudio Connect folder
rsconnect/
.DS_Store
.gitignore

12
exercise/1.R Normal file
View 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
View 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
View File

@ -0,0 +1,2 @@
sheet1 <- read.table("sheet-example1.csv", sep = ",", header = TRUE)
View(sheet1)

4
samples/sheet-example1.csv Executable file
View 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
1 colume 1 colume 2 colume 3 colume 4
2 row 1 686 655 651
3 row 2 161 515 656
4 row 3 791 125 687