R - Generating dynamic text for Select Argument in Subset Function -
R - Generating dynamic text for Select Argument in Subset Function -
i'm having problem using subset() within function i'm writing.
myfun <- function(arg1="", arg2="", arg3="") { temp.frame <- subset(master.frame, == arg1 & b == arg2 & c == arg3) }
this works fine if specifies arguments, if 1 or more of arguments isn't specified subset function doesn't work (as missing values in column vector passed null values in function calling)
i want work such if argument not specified, not included in subset() goes looking for.
so if input:
function1(arg2=5, arg3=6) in function1, subset command temp.frame <- subset(master.frame, b == 5 & c == 6)
any suggestions?
r arguments
Comments
Post a Comment