subset - R help- creating a sub-data set -
i have large dataset (38053 rows= transcripts, 39 columns=samples) want make new dataset sample values group of transcripts.
x= data1["698568366",]
works single transcript, "698568366" name of transcript
but instead of 1 @ time, want use lits of 3000
i thought should able use:
data1[data1[,1] %in% 3000_m,]
where 3000_m list in matrix form,
but keep getting back
<0 rows> (or row.names mit length 0)
here arrays , b:
a = c(1:10) b = c(11:20)
creating dataframe them:
df = data.frame(a, b)
here index array:
ind = c(3, 5, 7)
select rows indexed ind:
new_df = df[ind,]
you can't use multidimensional arrays index (as far know).
Comments
Post a Comment