search for: data_functions

Displaying 3 results from an estimated 3 matches for "data_functions".

2007 Apr 04
2
unexpected behavior when creating a list of functions
I wanted to create a list of functions whose output differs depending the value of a variable when the function was created. Generally this did not work. Each function was exactly the same, as in the simple example below: get_data_function <- function(v) { function() { print(v) } } data_functions <- sapply(1:10,function(v) get_data_function(v)) (data_functions[[1]])() # prints 10! However, if I insert a statement in get_data_function to print argument v, then I get the different functions that I wanted: get_data_function <- function(v) { print(v) function() { print(v) }...
2003 Jan 17
1
More info - S-Plus compatability
Dear all, Thanks to those of you who have replied, the majority of the comments pointed out that the error caused by scan may originate from another function, and closer inspection of the output from traceback() reveals that it is in fact the read.table function where the error is originating from the full output of which I have included below. The error msg I recieve is Error in
2006 Aug 21
5
lean and mean lm/glm?
Hi All: I'm new to R and have a few questions about getting R to run efficiently with large datasets. I'm running R on Windows XP with 1Gb ram (so about 600mb-700mb after the usual windows overhead). I have a dataset that has 4 million observations and about 20 variables. I want to run probit regressions on this data, but can't do this with more than about 500,000 observations before