[R] Looping through all possible combinations of cases

2007-07-30 Thread Dimitri Liakhovitski
Hello! I have a regular data frame (DATA) with 10 people and 1 column ('variable'). Its cases are people with names ('a', 'b', 'c', 'd', 'e', 'f', etc.). I would like to write a function that would sum up the values on 'variable' of all possible combinations of people, i.e. 1. I would like to

[R] (a) R capacity and (b) sorting cases in R

2007-07-17 Thread Dimitri Liakhovitski
1. I have a .txt file that has no more than 10 variables and about 3.5 MILLION cases. Can R handle so many cases or should I not even try? 2. How do I sort cases (e.g., alphabetically) in R and then save the sorted results in a new file? Thank you! Dimitri

[R] Sorting data frame by a string variable

2007-07-17 Thread Dimitri Liakhovitski
I have a data frame MyData with 2 variables. One of the variables (String) contains a string of letters. How can I resort MyData by MyData$String (alphabetically) and then save the output as a sorted data file? I tried: o-order(MyData$String) SortedData-rbind(MyData$String[o], MyData$Value[o])

[R] reading in ! - delimited file

2007-07-17 Thread Dimitri Liakhovitski
I have to read in a file that is ! delimited. Would it be correct to use the following syntax: Data-read.delim(file.choose(),sep=!) Or would it be wrong? I am asking rather than trying it just because I have 3.5 million cases to read in. Thank you! Dimitri

[R] determining the column index and grabbing only variables with a certain string in them

2007-06-26 Thread Dimitri Liakhovitski
Hello! I have a data set with almost 2,000 variables (called 'Data'). I want to select only a set of variables that have a certain string in them (e.g., Variable) - 'Variable.1', 'Variable.2', etc. until 'Variable.20'. 2 questions: 1. How can I determine the exact column index of a variable in

[R] creating a multivariate set of variables with given intercorrelations

2007-05-19 Thread Dimitri Liakhovitski
r2r3 b 1 r4r5 c 1 r6 d 1 Thank you very much! Dimitri Liakhovitski __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http