###################################################################### # R commands STAT588/BIOL588 # Lab 1 2023 University of South Carolina ###################################################################### # This file contains the R commands for the lab. # # Lines beginning with the symbol '#' are comments in R. All other # lines contain code. # # In R for Windows, you may wish to open this file from the menu bar # (File:Display file); you can then copy commands into the command # window. (Use the mouse to highlight one or more lines; then # right-click and select "Paste to console".) ###################################################################### #### objects # ax^2+bx+c=0 # x^2 + x -1=0 a<-1 b<-1 c<--1 str(a) ### workspace ls() x (-b+sqrt(b^2-4*a*c))/(2*a) (-b-sqrt(b^2-4*a*c))/(2*a) ###### functions exp(1) log(exp(1)) help(log) ## default value args(log) log(8, base=3) log(x=8, base=3) log(8,2) ### exception 2^3 help("+") ?"+" #### data object data() ### pi Inf #### variable name solution_1<-(-b+sqrt(b^2-4*a*c))/(2*a) solution_1<-(-b-sqrt(b^2-4*a*c))/(2*a) #### create and save a script #### comment