do.call Questions

2

Solved

Let's say I have some models stored in a list: mods <- list() mods[[1]] <- lm(mpg ~ disp, data = mtcars) mods[[2]] <- lm(mpg ~ disp + factor(cyl), data = mtcars) mods[[3]] <- lm(mpg ~ ...
Dremadremann asked 19/5, 2013 at 2:2

1

Solved

I am trying to bind some sub elements of the elements from the list The list OC is as follows > library(quantmod) > OC <- getOptionChain('AAPL', NULL) > str(OC) List of 9 $ Feb 201...
Concierge asked 20/2, 2013 at 5:38

4

Solved

I would like to interweave two data.frame in R. For example: a = data.frame(x=1:5, y=5:1) b = data.frame(x=2:6, y=4:0) I would like the result to look like: > x y 1 5 2 4 2 4 3 3 3 3 ....
Yearn asked 9/2, 2013 at 4:11

4

Solved

I am facing a strange problem about do.call and curve: func1 <- function (m, n) { charac <- paste ("func2 <- function(x)", m, "*x^", n, sep = "") eval(parse(text = charac)) return(func...
Millsaps asked 12/1, 2013 at 9:59

1

Solved

When run the following code, I obtain Error in as.graphicsAnnot(text) : could not find function "bold". How can I fix this? my.qq <- function(x, main=expression(bold(italic(F)~~"Q-Q plot")), m...
Bronwyn asked 21/12, 2012 at 0:56

4

Solved

I know there are many questions here in SO about ways to convert a list of data.frames to a single data.frame using do.call or ldply, but this questions is about understanding the inner workings of...
Statuary asked 15/3, 2012 at 21:25

4

I would like to find a way to create a data.frame by using cbind() to join together many separate objects. For example, if A, B, C & D are all vectors of equal length, one can create data.frame...
Varese asked 4/4, 2011 at 18:16

5

This is a question regarding coding in R. The example I provide is didactic. Suppose I have functions called 'func1' and 'func2', where each takes two arguments (let's say scalars). I want to spec...
Ody asked 10/2, 2011 at 16:31

© 2022 - 2024 — McMap. All rights reserved.