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

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -