potatowhose value corresponds to the number of potatos you’ve eaten in the last week. Or something equally stupid. It doesn’t matter.potatoby typing the variable name.print()functionpotatousing the sqrt()function.potatohasn’t changedpotatoto potato * 2Inf(infinity), -Inf(minus infinity), NaN(“not a number”)NANULLc()c()agewhose elements contain the ages of three people you know, where the names of each element correspond to the names of those peopleagegreater than (say) 25 (or some other number if that makes the results more interesting)ageFor this exercise, we’ll use one of the data frames that comes bundled with R, rather than trying to create a new one. The airqualitydata frame contains 153 cases and 6 variables. You can’t actually see it in the workspace because R is storing it in a “hidden” location (sort of).
airqualityat the command line to see what it looks like. (I won’t include the output for this in the solution set because it’s 153 lines long!)$method to print out the Windvariable in airqualityWindvariableaqthat includes only the first 10 cases. Hint: typing c(1,2,3,4,5,6,7,8,9,10)is tedious. R allows you to use 1:10as a shorthand method!aqwhere the Ozone level was higher than 20. (Note how the output deals with the NAvalues)subset()to do the same thing. Notice the difference in the output.TooWindyvariable inside aq, which is a logical variable that is TRUEif Windyis greater than 10, and FALSEotherwise"male","female","other"rm().