Re: [R] R Error: wrong result size (...), expected ... or 1 (minimal example provided)

2015-05-02 Thread William Dunlap
# invoke user defined function myFunc ( newdata=nmpr_nmproid, oridata=xanloid_set, cohort=xanloid_set$cohort_type, value= NMPR_Cohort, xdate_to_int_time=anl_to_int_time, xflag=xanloid_set$anlflag, idate=xanloid_set$intdate,

[R] R Error: wrong result size (...), expected ... or 1 (minimal example provided)

2015-05-01 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hello, I am reposting my question with a reproducible example/minimal dataset (6 rows) this time. I have written a user-defined function (myFunc below) with ten arguments. When calling the function, I get the following message: �Error: wrong result size (0), expected 2 or 1�. I am not getting

[R] R Error: wrong result size (...), expected ... or 1”

2015-04-28 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hello, I have written a user-defined function (myFunc below) with ten arguments. When calling the function, I get the following message: �Error: wrong result size (816841), expected 52939 or 1�. myFunc involves a data frame (named xanloid_set), which has 816841 rows. R is correct to say that