search for: csv_data2

Displaying 2 results from an estimated 2 matches for "csv_data2".

2008 Jun 06
2
Merging two dataframes
...well. My dataframes have 67 and 28 cases respectively and i would like ot end uip with one file 67 cases long (all 28 are matched cases). I can use the merge command to merge two datasets together this but i still get some odd results, i'm using the code below; ETC <- read.csv(file="CSV_Data2.csv",head=TRUE,sep=",") 'SURVEY <- read.csv(file="survey.csv",head=TRUE,sep=",") 'FullData <- merge(ETC, SURVEY, by.SURVEY = "uid", by.ETC = "ord") The merged file seems to have 1800 cases while the ETC data file only has 67 and...
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame. For instance > ddTable <- data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry")) I want a dataset that is Id Name 1 Paul 2 Bob > unique(ddTable) Will give me all 4 rows, and > unique(ddTable$Id) Will give me c(1,2), but not accompanied by the name column.