Read the clipboard into R:
Write out the data in a Dataframe into the clipboard:
You can use this to paste data into other applications.
Create a DataFrame filled with random data (there may be a shorter way of doing this)
Here we’ve used “cbind” which means bind some columns
the data.frame bit seems to convert something into a collection of columns into a DataFrame.
Now join them together…
Now for some reason we have to convert from factors to numerics…
Notice that we’ve added two extra columns x1 has been converted into X1 and x2 to X2
Finally let’s plot them:
scatterplot(X1 ~X2 | V1 ,data=df0,smooth=FALSE,ellipse=FALSE,lty=0)
Which will look something like this:
We can also generate a boxplot using:
bwplot(X2~V1,data = df0)
boxplot(X2~V1,data = df0)
bwplot requires the lattice library.
Back to the scatter plot graph:
scatterplot(X1 ~X2 | V1
Which gives something like this:
Here the boxplots are describing all of X1 and X2 i.e. X1 of A and D combined.