Skip to content

Instantly share code, notes, and snippets.

View Datoto1205's full-sized avatar
🏠
Working from home

Li Cheng-En Datoto1205

🏠
Working from home
View GitHub Profile
# Assign the value
firstInteger <- 1
secondDouble <- 0.5
firstVector <- c(1,2,3,4,5)
secondVector <- c(10,20,30,40,50)
thirdVector <- c(2, 4, -1, 3, 10)
forthVector <- c(-1, -2, -3, -4, -5)
# Fundamental statistics
mean(firstVector)
# cat()
cat("Hello world")
cat(matrix(c(1, 2, 3, 4), 2, 2))
# print()
print("Hello world")
print(matrix(c(1, 2, 3, 4, 5, 6), 3, 2))