search for: arg_valu

Displaying 2 results from an estimated 2 matches for "arg_valu".

Did you mean: arg_val
2011 Jul 27
2
Plotting a function that includes logical operators
I am trying to plot the following function over the range 0-100 test <- function(t){{ if (t<=10) x<-t*0 else x<-2*t } x } when I use plot(test,0,100) the GUI produces the following; "Warning message: In if (t <= 10) x <- t * 0 else x <- 2 * t : the condition has length > 1 and only the first element will be used" I am confused as when I evaluate the function
2008 Mar 18
14
Proposal for an improved API for Sizer (and ToolBar)
...e # e.g. [ [:proportion, 0], [:flag, 0], [:border, 0] ] def self.args_as_list(args_def, *mixed_args) # get keyword arguments from mixed_args if supplied, else empty kwa = mixed_args.last.kind_of?(Hash) ? mixed_args.pop : {} out_args = [] args_def.each_with_index do | (arg_name, arg_value), i | if arg = mixed_args[i] # use the supplied list arg out_args << arg elsif kwa.key?(arg_name) # use the keyword arg out_args << kwa[arg_name] else # use the default argument out_args << arg_value end end out_args rescu...