Displaying 4 results from an estimated 4 matches for "rowno".
Did you mean:
rown
2012 Mar 20
2
Reshaping data from long to wide without a "timevar"
...to reshape data from long to wide in R without using a "timevar". I've pasted some sample data below along with some code. The data are sorted by Subject and Drug. I want to transpose the Drug variable into multiple columns in alphabetical order.
My data have a variable called "RowNo" that functions almost like a "timevar" but not quite. In Subject 6, Erlotinib has a RowNo value of 3 whereas Paclitaxel has a RowNo value of 2. So if I use reshape as in the first bit of code below, the columns for drug don't transpose in alphabetical order. That is, Paclitaxel...
2007 Nov 16
2
expand.grid overflows?
>cbn<-as.matrix(expand.grid( rep( list(0:1), 50)))
Error in rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) :
invalid 'times' value
In addition: Warning message:
In rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep) :
NAs introduced by coercion
But I'm only interested in cbn matrix rows where:
cbn<- cbn[rowSums(cbn)==5,]
Is there a way to evaluate it
2010 May 05
1
rcorr p-values for pearson's correlation coefficients
..._cor_p123$r[i,j,drop=F]))
pcc=rbind(pcc,y_cor_p123$r[i,j])
}
}
}
y_gp123=cbind(gene1,gene2,pcc)
colnames(y_gp123)=c("Gene1","Gene2","PCC")
y_gp123=y_gp123[-1,]
#Selecting p-values for gene pairs with pcc above 0.8
z=matrix(0,nrow(y_gp123),1)
for(i in 1:nrow(y_gp123))
{rowno=grep(y_gp123[i,1],rownames(y_cor_p123$P))
colno=grep(y_gp123[i,2],colnames(y_cor_p123$P))
z[i,]=y_cor_p123$P[rowno,colno]}
y_gp123=cbind(y_gp123,z)
> head(y_gp123)
Gene1 Gene2 PCC P-Value
[1,] "10003_f_at" "10166_at" "0.8162704706192...
2011 Jul 19
2
read.csv help
...ies and i'm not sure how to
resolve this.
the format of my data is
A, B, C, D,......(3984 columns)
12, 13, 41,......(all numeric)
it either treats column A as rownames or if I explicitly disable row names
with row.names = NULL field it right shifts all the columns like
rowno. A B C Last column
1 12 13 41 .... NA
Srinivas
--
View this message in context: http://r.789695.n4.nabble.com/read-csv-help-tp3677454p3677454.html
Sent from the R help mailing list archive at Nabble.com.