Displaying 1 result from an estimated 1 matches for "edwardpatzelt".
2011 Jun 28
2
Loop through each subject
R help -
I am attempting to write a script that has multiple subjects in 1 data file.
Each subject has multiple rows with columns as variables. Here is my code,
I am having problem executing it on each unique subject id (dat$Subject).
getwd()
setwd("/Users/edwardpatzelt/Desktop/Neuroimaging/MERIT/SRRT/merge")
dat <- read.table("test2.txt", header = TRUE, na.strings = NA,
stringsAsFactors = FALSE, sep = "\t")
for(i in 1:length(dat))
{
for (i in 1:)dat[(unique(dat$Subject)),)]
{
colg <- dat[grep("Green", dat$Cu...