Displaying 2 results from an estimated 2 matches for "mergedf".
Did you mean:
merged
2013 May 15
2
R help: Batch read files based on names in a list
...<- c("RowA", "RowB", "RowC")>>File1_DF <- read.delim("\\\\DirectoryToFiles\\File1_Folder\\File1.txt", stringsAsFactors=FALSE, check.names=FALSE)>File1_DF <- as.data.frame(t(File1_DF[MyRows,]))>File1_DF <- as.data.frame(t(File1_DF))>mergeDF <- merge(mergeDF,File1_DF, by.x = "Row.names", by.y="row.names")>>File2_DF <- read.delim("\\\\DirectoryToFiles\\File2_Folder\\File2.txt", stringsAsFactors=FALSE, check.names=FALSE)>File2_DF <- as.data.frame(t(File2_DF[MyRows,]))>File2_DF <- as.d...
2009 Jun 10
2
Merge data frame and keep unmatched
...s that merge() dosen't
keep the unmatched lines. Is there another function that I could use to
merge the data frames.
Example:
completedf <- expand.grid(alpha=letters[1:3],beta=1:3)
partdf <- data.frame(
alpha= c('a','a','c'),
beta = c(1,3,2),
val = c(2,6,4))
mergedf <- merge(x=completedf, y=partdf, by=c('alpha','beta'))
# it only kept the common rows
nrow(mergedf)
Thanks,
Etienne
--
View this message in context: http://www.nabble.com/Merge-data-frame-and-keep-unmatched-tp23962874p23962874.html
Sent from the R help mailing list archive at...