Hello everyone,
I am studying R and I have an exercise about read the result of a plot.
library(dslabs)
data("olive")
head(olive)
plot(olive$palmitic, olive$palmitoleic)
you can see whats I am seeing and de question is "Plot the percent palmitic acid versus palmitoleic acid in a scatterplot. What relationship do you see?"
I am just putting the question, if it is necessary. what I really want to know is how to read
This plot shows f(x) = y for x =wt and y =mpg. This is mileage (miles per gallon of fuel) against weight (in pounds), the x axis and the y axis, respectively.
What do you observe about the position of the mpg points as wt increases? Does it change? If so, how?
With more weight we have less miles per gallon, that's seems like easy to read. but I have to types of data. The results can be linear or exponetial(positive or negative) right? in this case seems like linear negative right? is there any function that shows data in a linear or exponential way?
This can be done with the plot function. You should look through its documentation:
?plot.default
But here's the relevant parameter of the function:
log
a character string which contains "x" if the x axis is to be logarithmic, "y" if the y axis is to be logarithmic and "xy" or "yx" if both axes are to be logarithmic.