Questions tagged [do.call]

do.call constructs and executes a function call from a name or a function and a list of arguments to be passed to it.

do.call is an R command that takes a list of arguments, executes a function call and then returns the result of the function call. Full documentation here

231 questions
-1
votes
1 answer

solving the "Error in file(file, "rt") : cannot open the connection" in my R coding

I have many CSV files in 10 folders and I need to merge all CSV files existed in every folder into one dataframe. Let's say at the end I will have 10 data frame each is output of merging several CSV files in related folder. to do this and reduce…
Sh Sab
  • 1
  • 1
-1
votes
1 answer

split character combine and reshape dataframe in R

I am trying to built a patent network. I have a sample dataframe (aa) that contains an ID variable (origin) and string character (Target). I want to split the string character into separate groups and then add it back to the dataframe in long…
-1
votes
1 answer

merging numerous .csv datafile into one data frame

I have numerous .csv files, that I have save in one folder on my PC. Then, I create a list of theses dataset as follows: > file_list <- list.files() > file_list [1] "ABWAbwut50.csv" "ABWEinfam50.csv" "ABWFeldwaldasph50.csv"…
Nneka
  • 1,764
  • 2
  • 15
  • 39
-1
votes
1 answer

Use do.call to get information out of a list of RC/S4 objects

I have a defined reference class and a list: RCclass<-setRefClass("RCclass",field=list(info="character")) A<-RCclass$new(info="a") B<-RCclass$new(info="b") testList<-list(A,B) do.call(function(x){paste0(x$info)},testList) The do.call function…
chl111
  • 468
  • 3
  • 14
-1
votes
1 answer

Error in R do.call function

When I run the following code line by by, everything is fine except when the cusrsor goes to do.call. require(highfrequency) require(quantmod) require(readxl) require(xlsx) setwd("file_path") input_files=list(list.files(path="file_path",…
gaurav kumar
  • 859
  • 2
  • 10
  • 24
-3
votes
2 answers

List of Lists of matrices

I'm trying to manipulate an R list of lists which themselves contain matrices. What I want to do is similar to this question where a list of matrices, l, is combined into a single matrix using either do.call(rbind, l) or the rbind.fill.matrix(l)…
NWPhy
  • 19
  • 2
1 2 3
15
16