I have a huge data frame, and I would like to make some graphs to get an idea of ββthe associations between the various variables. I can not use
pairs(data)
because it will give me more than 400 stories. However, there is one answer variable that I am particularly interested in. Thus, I would like to build y against all variables, which would reduce the number of graphs from n ^ 2 to n. Can you show me how to do this? Thanks
EDIT: I am adding an example for clarity. Say I have a dataframe
foo=data.frame(x1=1:10,x2=seq(0.1,1,0.1),x3=-7:2,x4=runif(10,0,1))
and my response variable is x3. Then I would like to create four graphs located in a row, respectively, x1 vs x3, x2 vs x3, histogram x3 and finally x4 vs x3. I know how to make every story
plot(foo$x1,foo$x3) plot(foo$x2,foo$x3) hist(foo$x3) plot(foo$x4,foo$x3)
However, I have no idea how to organize them in a row. Also, it would be great if there was a way to automatically make all n graphs without having to call up a command graph (or histogram) every time. When n = 4, this is not so important, but I usually deal with n = 20 + variables, so it can be drag and drop.