Displaying 5 results from an estimated 5 matches for "suffix3".
Did you mean:
suffix
2011 Jun 09
1
Trying to make code more efficient
...ce", "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 = c(state), inscompany = c(inscompany), city=c(city),
cityst = c(cityst), agency=c(agency))
myone <- function(x, y) {
m1 <- do.call(paste, expand.grid(lst[[x]], lst[[y]]))
mydf <- data.frame(keyword=c(m1))...
2011 Jun 09
1
Error: missing values where TRUE/FALSE needed
...<- 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(paste, expand.grid(lst$x, lst$y))
mydf <- data.frame(keyword=c(nu))
}
mytwo <- function(x, y, z){
mu <- do.call(paste, expand.grid(lst$x, lst$y, lst$z))
mydf2 <- data.frame(keyword=c(mu))
}
d1 = mytwo(lst$prefix,...
2011 Jun 09
2
Problem with a if statement inside a function
...ce", "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 = c(state), inscompany = c(inscompany), city=c(city),
cityst = c(cityst))
myone <- function(x, y) {
m1 <- do.call(paste, expand.grid(lst[[x]], lst[[y]]))
}
mytwo <- function(x, y, z){
m2 <...
2011 Jun 06
1
Merge two columns of a data frame
...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(roots3, suffix3)
df1; df2; df3
df1, df2, and df3 are seperate data structures with seperate columns for
root, prefix, and suffix.
Var1...
2011 Jun 09
1
Using a function inside a function
...<- 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 <- function(x, y) {
nu <- do.call(paste, expand.grid(x, y))
mydf <- data.frame(keyword=c(nu))
}
mytwo <- function(x, y, z){
mu <- do.call(paste, expand.grid(x, y...