[R] Using "Compare" While Excluding Certain Columns

2012-03-22 Thread Edgar Alminar
Hello All, Is it possible to use compare (or something like it) and exclude certain columns in the csv's being compared? I have tried a bunch of different things and done some research, but couldn't find anything or get it to work. Any help would be greatly appreciated. Thanks! Edg

[R] Adding columns to csvs in a loop

2012-03-19 Thread Edgar Alminar
Hello, I am trying to add columns to a folder of csvs (the folder is called "20120314"). I have csvs of different numbers of columns, but at the end of this loop, I'd like to add three columns to each csv: "QID", "COMMENTS", "DATE CREATED". I've tried some things with cbind, I looked at using aw

Re: [R] Military Time Comparison

2012-02-26 Thread Edgar Alminar
I feel like I'm just missing a piece of the syntax (i.e. as.date, as.character, but what works for time?) I hope this helps. :-) Thanks! On Feb 26, 2012, at 9:32 PM, David Winsemius wrote: > > On Feb 26, 2012, at 10:31 PM, Edgar Alminar wrote: > >> Hello All, >> I

[R] Military Time Comparison

2012-02-26 Thread Edgar Alminar
military times. I'm trying to do a comparison like this: match2 = subset(match2, AEONTIME < INFTIME.x) But it's not working correctly. How do I do this? :-) THANKS! Edgar Alminar Clinical Operations Alzheimer's Disease Cooperative Study University of California, San Diego

[R] Sum Question

2011-06-30 Thread Edgar Alminar
>> I did this: >> >> library(data.table) >> >> dd <- data.table(bl) >> dd[,sum(as.integer(CONTTIME)), by = SCRNO] >> >> (I used as.integer because I got an error message: sum not meaningful for >> factors) >> >> And got this: >> >>SCRNO V1 >> [1,] HBA0020036 111 >> [2,] HBA0020

[R] Sum Question

2011-06-29 Thread Edgar Alminar
Hello, I have the following dataset (this is a piece of a much larger set): RID SCRNO VISCODE RECNO CONTTIME 2318 HBA0190012 bl 15 2418 HBA0190012 bl 35 2818 HBA0190012 bl 55 2918 HBA0190012 bl 25 321