search for: roots2

Displaying 5 results from an estimated 5 matches for "roots2".

Did you mean: roots
2011 Jun 09
1
Trying to make code more efficient
I have a repetative task in R and i'm trying to find a more efficient way to perform the following task. lst <- list(roots = c("car insurance", "auto insurance"), roots2 = c("insurance"), prefix = c("cheap", "budget"), prefix2 = c("low cost"), suffix = c("quote", "quotes"), suffix2 = c("rate", "rates"), suffix3 = c("comparison"), state =...
2011 Jun 09
1
Error: missing values where TRUE/FALSE needed
I'm writing a function and keep getting the following error message. myfunc <- function(lst) { lst <- list(roots = c("car insurance", "auto insurance"), roots2 = c("insurance"), prefix = c("cheap", "budget"), prefix2 = c("low cost"), suffix = c("quote", "quotes"), suffix2 = c("rate", "rates"), suffix3 = c("comparison")) myone <- function(x, y) { nu <- do.call(p...
2011 Jun 09
2
Problem with a if statement inside a function
...nn Arbor, MI", "South Bend, IN", "Daytona Beach, FL", "Peoria, IL", "Atlantic City, NJ", "Antioch, CA", "Thousand Oaks, CA") lst <- list(roots = c("car insurance", "auto insurance"), roots2 = c("insurance"), prefix = c("cheap", "budget"), prefix2 = c("low cost"), suffix = c("quote", "quotes"), suffix2 = c("rate", "rates"), suffix3 = c("comparison"), state =...
2011 Jun 06
1
Merge two columns of a data frame
I have the following data: prefix <- c("cheap", "budget") roots <- c("car insurance", "auto insurance") suffix <- c("quote", "quotes") prefix2 <- c("cheap", "budget") roots2 <- c("car insurance", "auto insurance") roots3 <- c("car insurance", "auto insurance") suffix3 <- c("quote", "quotes") df1 <- expand.grid(prefix, roots, suffix) df2 <- expand.grid(prefix2, roots2) df3 <- expand.grid(roo...
2011 Jun 09
1
Using a function inside a function
I'm trying to run a function inside a function but get an error message. lst <- list(roots = c("car insurance", "auto insurance"), roots2 = c("insurance"), prefix = c("cheap", "budget"), prefix2 = c("low cost"), suffix = c("quote", "quotes"), suffix2 = c("rate", "rates"), suffix3 = c("comparison")) myfunc <- function(lst) { myone <-...