R version 4.5.2 (2025-10-31 ucrt) -- "[Not] Part in a Rumble" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x -> 5 Error in 5 <- x : invalid (do_set) left-hand side to assignment > 5 -> x > x [1] 5 > TRUE <- 10 Error in TRUE <- 10 : invalid (do_set) left-hand side to assignment > sklhadfawoir <- 100 > x1 <- 100 > ls() [1] "sklhadfawoir" "x" "x1" > getwd() [1] "C:/Users/user/Documents" > setwd('C:/Users/user/Documents/Project1') > getwd() [1] "C:/Users/user/Documents/Project1" > > ?mean #calling help on 'mean' starting httpd help server ... done > ?rivers > > rivers [1] 735 320 325 392 524 450 1459 135 465 600 330 336 280 315 870 [16] 906 202 329 290 1000 600 505 1450 840 1243 890 350 407 286 280 [31] 525 720 390 250 327 230 265 850 210 630 260 230 360 730 600 [46] 306 390 420 291 710 340 217 281 352 259 250 470 680 570 350 [61] 300 560 900 625 332 2348 1171 3710 2315 2533 780 280 410 460 260 [76] 255 431 350 760 618 338 981 1306 500 696 605 250 411 1054 735 [91] 233 435 490 310 460 383 375 1270 545 445 1885 380 300 380 377 [106] 425 276 210 800 420 350 360 538 1100 1205 314 237 610 360 540 [121] 1038 424 310 300 444 301 268 620 215 652 900 525 246 360 529 [136] 500 720 270 430 671 1770 > help(var) > ?+ + > ?'+' > ls() [1] "sklhadfawoir" "x" "x1" > history() > a <- (3+5)^(1+1.5 + ) > a [1] 181.0193 > hist(rivers) #note this is a graphics command > mean(rivers) [1] 591.1844 > hist(rivers) > boxplot(rivers) > NOW ON in RStudio R version 4.5.2 (2025-10-31 ucrt) -- "[Not] Part in a Rumble" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- 10 > y <- 20 > z <- x+y > a <- (3+5)^((1+1.5)) > ?help > mean(rivers) [1] 591.1844 > hist(rivers) > boxplot(rivers) > rm(z,y) #deletes variables z and y > z Error: object 'z' not found > > > #to remove all variables at once we type: > rm(list=ls()) > > > 15 %% 4 [1] 3 > > 15 %/% 4 [1] 3 > > 20 %% 4 [1] 0 > 20 %/% 4 [1] 5 > 15/4 [1] 3.75 > > > 5 * 4 #arithmetic operator [1] 20 > 5 > 4 #logical operator [1] TRUE > 5 == 4 #another logical operator n [1] FALSE > 5 = 4 Error in 5 = 4 : invalid (do_set) left-hand side to assignment > > log(0) [1] -Inf > > #special values in R > b <- NA > c <- MA Error: object 'MA' not found > rivers1.10 <- rivers[1:10] > rivers1.10 [1] 735 320 325 392 524 450 1459 135 465 600 > rivers1.10[c(1,5)] <- NA > rivers1.10 [1] NA 320 325 392 NA 450 1459 135 465 600 > mean(rivers1.10) [1] NA > log(-1) [1] NaN Warning message: In log(-1) : NaNs produced > 0/0 [1] NaN > rivers1.10[3] <- nan Error: object 'nan' not found > rivers1.10[3] <- NaN > rivers1.10 [1] NA 320 NaN 392 NA 450 1459 135 465 600 > rivers1.10[8] <- Inf > rivers1.10 [1] NA 320 NaN 392 NA 450 1459 Inf 465 600 > > > #order of operations > 5+3*4 [1] 17 > (5+3)*4 [1] 32 > 5 == 4 #another logical operator n [1] FALSE > 10*(5 == 4) [1] 0 >