search for: fulldf

Displaying 4 results from an estimated 4 matches for "fulldf".

2011 Apr 01
3
programming: telling a function where to look for the entered variables
...nction in which dataframe the entered variables are located. Here's some reproducible data and the function: # create reproducible data set.seed(124) xvar <- sample(0:3, 1000, replace = T) yvar <- sample(0:1, 1000, replace=T) zvar <- rnorm(100) lvar <- sample(0:1, 1000, replace=T) Fulldf <- as.data.frame(cbind(xvar,yvar,zvar,lvar)) Fulldf$xvar <- factor(xvar, labels=c("blue","green","red","yellow")) Fulldf$yvar <- factor(yvar, labels=c("area1","area2")) Fulldf$lvar <- factor(lvar, labels=c("yes",&quot...
2011 Jul 08
1
Confused about a warning message
I define the following function to convert a t-value with degrees of freedom DF to another t-value with different degrees of freedom fullDF: tConvert <- function(tval, DF, fullDF) ifelse(DF>=1, qt(pt(tval, DF), fullDF), 0) It works as expected with the following case: > tConvert(c(2,3), c(10,12), 12) [1] 1.961905 3.000000 However, it gives me warning for the example below although the output is still as intended: > tCo...
2013 Apr 25
1
Linear Interpolation : Missing rates
Dear R forum I have data.frame as df = data.frame(rate_name = c("USD_1w", "USD_1w", "USD_1w", "USD_1w", "USD_1m", "USD_1m", "USD_1m", "USD_1m", "USD_2m", "USD_2m", "USD_2m", "USD_2m",  "GBP_1w", "GBP_1w", "GBP_1w", "GBP_1w",
2009 May 14
1
Supplying NA or Zeros in dataframe for missing factor combinations
Hi there, I am not getting anywhere near a solution, so here is my question. I have searched the archives and didn't find a solution, but maybe my search didn't use the right words. So here it is: I have a dataframe with the following structure factor1 factor2 value In the (rather large) dataset I have to work on, there are some factor combinations missing, e.g. factor1 <-