example R session 5-23-12

2013-12-01

azim58 - example R session 5-23-12


To import data from a text file type
data<-read.table("C:/Documents and
Settings/kwhittem/Desktop/temp/data.txt")

To see all of the data stored in the data variable type data and hit
enter or type edit(data)

To extract one column or row from data
data,1
This would give you the first column if there is only one column in the
file

To adjust all of the p values (if your data contains p values)
p.adjust(data,1,"BH")

This could be stored into another value as well
x=p.adjust(data,1,"BH")

If you want to see all of the values less than a certain value
x<0.05

If you want to know the number of samples that are less than a certain
value
sum(x<0.05)


For some data, I was obtaining adjusted p values that were nearly all
uniform or were the same value. This happens when there aren't enough
features with low raw p values as explained here:
https://stat.ethz.ch/pipermail/bioconductor/2007-September/018978.html