Displaying 6 results from an estimated 6 matches for "join_all".
2013 Mar 28
0
CRAN R Help
...lations" as first column
#Merge with a subset of data
library(plyr)
lstSub<- lapply(list.files()[grep("BONDS|Equity|FOREX",list.files())],function(x) {x1<-head(read.csv(x,sep=",",stringsAsFactors=FALSE)); colnames(x1)[1]<- "simulations";x1}) #subset
?join_all(lstSub,type="inner",by="simulations") # depending on your needs, you can change to type="full"
head(join_all(lstSub,type="inner",by="simulations"),2) #looks like columns are in the same order as in the individual dataset
#????? simulations T_Bond_1...
2013 May 15
2
R help: Batch read files based on names in a list
*
I am currently reading in a series of files, applying the same functions to
them one at a time, and then merging the resulting data frames e.g.:
>MyRows <- c("RowA", "RowB", "RowC")>>File1_DF <- read.delim("\\\\DirectoryToFiles\\File1_Folder\\File1.txt", stringsAsFactors=FALSE, check.names=FALSE)>File1_DF <-
2013 Mar 29
3
if clause in data frame
Hi,
final<-data.frame()
?? for (m1 in 4:10) {
?????? for (n1 in 4:10){?
?????????? for (x1 in 0: m1) {
????????????? for (y1 in 0: n1) {
final<- rbind(final,c(m1,n1,x1,y1))
res}}}}
?final1<-within(final,{flag<-ifelse(x1/m1>y1/n1, 1,0)})
?head(final1)
#? m1 n1 x1 y1 flag
#1? 4? 4? 0? 0??? 0
#2? 4? 4? 0? 1??? 0
#3? 4? 4? 0? 2??? 0
#4? 4? 4? 0? 3??? 0
#5? 4? 4? 0? 4??? 0
#6? 4? 4?
2013 Jan 11
2
Merging list of dataframes with reshape merge_all
Hi,
I'd like to merge mutliple dataframes from a list of dataframes by some common
columns. The approach for simply merging 2 dataframes is working with:
merge(df1,df2,by=c("col1","col2","col3"),all=TRUE)
For mutliple dataframes in a list I try to use the merge_all command
from the package reshape.
The documentation states that the command takes a list of
2011 Dec 21
0
[LLVMdev] A better CMake
...'-Werror' ]) ++
flags ++
# Include dirs by default are relative to source root
# Syntax for closures is 'x => expr(x)'
include_dirs.map(x => ['-I', path.join(source_dir, x)]).merge() ++
['-o', outputs[0]] ++
path.join_all(source_dir, sources))
]
},
# clang, when used as a linker
'linker' = linker { # Inherit from generic linker prototype
# Inputs
param flags : list[string]
param lib_dirs : list[string]
param libs : list[string]
param sources : list[strin...
2013 Feb 28
11
new question
Hi,
directory<- "/home/arunksa111/data.new"
#first function
filelist<-function(directory,number,list1){
setwd(directory)
filelist1<-dir(directory)
direct<-dir(directory,pattern = paste("MSMS_",number,"PepInfo.txt",sep=""), full.names = FALSE, recursive = TRUE)
list1<-lapply(direct, function(x) read.table(x,header=TRUE, sep =