Displaying 4 results from an estimated 4 matches for "exprdata".
Did you mean:
expdata
2009 Feb 12
0
Error Message: Error in dim(data) <- dim : attempt to set an attribute on NULL
...conductor.org/biocLite.R")
biocLite()
library(limma)
library(Biobase)
#change directory to folder where files are (c:/limmadegenes)
#Change to directory with original data files
#read in expression data file and phenotypic data.
#Note that row.names=1 means that row names are #in column 1,
exprdata<-read.table("exprsData.txt", header=TRUE,sep="\t",row.names=1,as.is=TRUE,fill=TRUE,)
class(exprdata)
#[1] "data.frame"
dim(exprdata)
#[1] 17328 28
colnames(exprdata)
head(exprdata)
#printout too long to paste
phenotypicdata<-read.table("phenotypicdata.txt...
2010 Jan 15
1
Remove part of string in colname and calculate mean for columns groups
Hi all,
I have two question. First, I wonder how to remove a part of the column names in a matrix? I would like to remove the "_ACCX" or "_NAX" part below. Is there a method where the "_" as well as all characters after i can be removed?
> dim(exprdata)
[1] 88 512
>
> colnames(exprdata[,c(1:20)])
[1] "Akita_ACC1" "Akita_ACC2" "Akita_ACC3" "Akita_ACC4" "Alc.0_ACC1" "Alc.0_ACC2" "Alc.0_ACC3"
[8] "Alc.0_ACC4" "Alc.0_ACC5" "Bl.1_ACC1" "...
2008 Feb 02
1
Help with loops and how R stores data
...s, and I am not experienced enough with R to know how it stores data
when looping and how to overcome this problem. By having it print the avg, I
was expecting to see 24 numbers, but it only gives me one.
Here is my code.
cts.sds<-array(1:24,c(3,8))
for(i in 3){
for(j in 8){
avg<-sum(exprdata[3*i-2:3*i,j]/3)
cts.sds[i,j]<-avg
print(avg)
}
}
print(cts.sds)
Any help with this pesky matter will be greatly appreciated.
--
View this message in context: http://www.nabble.com/Help-with-loops-and-how-R-stores-data-tp15247392p15247392.html
Sent from the R help mailing list archi...
2010 Jan 15
2
How to delete matrix rows based on NA frequency?
Hi all,
I would like to remove rows from a matrix, based on the frequency of missing values. If there are more than 10 % missing values, the row should be deleted.
I use the following to calculate the frequencies, thereby getting a new matrix with the frequencies:
freqNA=rowMeans(is.na(exprdata))
But is there a shorter way to remove the rows based on "(1-freqNA)>0.1" than looping through the whole matrix using a for loop?
All the best,
Joel
_________________________________________________________________
Hitta kärleken i vinter!
http://dejting.se....