The learning curve wouldnt be that steep if there was some decent documentation with simple instructions. After about 3 weeks, I've finally figured out how to generate a simple scatterplot. Even perl with its primitive GD and chart options wouldnt have taken longer than 4 hours to figure out. What a waste of time! But I guess in the "long run" figuring out how to actually do it maybe useful.
I thought I'd just post what I'd done for the benefit anyone else in a similar predicament.
1. Start R client by typing : R
2. read in tab delimited file, substitute
d=read.table ('
3. Check if all rows read in using (remember d is your variable):
dim(d)
4. If your file doesnt have headers as is the case with mine, your columns will be called V1, V2, V3, etc. To generate a scatterplot (this is the default graph type in R):
plot (d$V3,d$V2)
remember d is the variable for the matrix of values, you prefix with $ to access any of the columns. I wanted V3 on the x axis , so I specified that first.
5. Quit from R:
q()
6. You should be asked if you wanted to save images from your session say yes.
7. File is stored by default under R.pdf
I haven't figured out how you specify an output file name or if theres an easy way to generate and concatenate multiple plots. But hey, there should always be a start! Even if its with P-I-T-A "R" (just my personal sentiment, for now at least).
2 comments:
Read:
http://freshmeat.net/articles/creating-charts-and-graphs-with-gnu-r
Thanks, that was a good one. Now, if only I can get bioinformatics modules like Limma to work!
Post a Comment