Re: [R] Using changing names in loop in R

2010-11-08 Thread Tuatara
Josh, thanks so much for your detailed reply. This is exactly what I was looking for. -- View this message in context: http://r.789695.n4.nabble.com/Using-changing-names-in-loop-in-R-tp3030132p3031899.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Using changing names in loop in R

2010-11-06 Thread Tuatara
A more detailed example: Say I would like to read in data files that are set-up identically and have identical (but somewhat) different text names (see below): data_1 <- read.csv("data1.txt") data_2 <- read.csv("data2.txt") data_3 <- read.csv("data3.txt") How do I automate this process? (I ass

[R] Using changing names in loop in R

2010-11-06 Thread Tuatara
Hello everybody, I have usually solved this problem by repeating lines of codes instead of a loop, but it's such a waste of time, I thought I should really learn how to do it with loops: What I want to do: Say, I have several data files that differ only in a number, e.g. data points (or vector

Re: [R] Deleting rows based on duplicate entries in one columns in a data matrix

2010-01-19 Thread Tuatara
Thanks for the swift replies. I have found this to work for my purpose: data <- subset(X, !duplicated(X[,3]) -- View this message in context: http://n4.nabble.com/Deleting-rows-based-on-duplicate-entries-in-one-columns-in-a-data-matrix-tp1018110p1018126.html Sent from the R help mailing list

[R] Deleting rows based on duplicate entries in one columns in a data matrix

2010-01-19 Thread Tuatara
Hi everybody, I would like to delete rows based on duplicate entries in column 3 in the data matrix X (size 6 x 57). I have tried the unique(x) command as > data <- X[unique(X[,3]),] however, for some reason the command introduces a lot of NA's into the dataset. So, now I'm looking for a