Displaying 3 results from an estimated 3 matches for "unknownfunction".
Did you mean:
unknown_function
1997 Jul 25
0
R-alpha: Treatment of seed
...seed is
restored to its old value in S-Plus, but not in R. This feature of S-Plus
has just turned out to be very useful for me because I got an error
message during a small simulation for a certain choice of parameters.
Here is a silly example:
R> silly<-function()
+ {
+ tmp<-rnorm(5)
+ unknownfunction()
+ }
R> .Random.seed
[1] 8886 1153 10190
R> silly()
Error: couldn't find function "unknownfunction"
R> .Random.seed
[1] 9859 1963 19516
Splus> silly<-function()
+ {
+ tmp<-rnorm(5)
+ unknownfunction()
+ }
Splus> .Random.seed
[1] 37 31 60 6 22 0 47 15 0...
2005 Jul 19
2
Obtaining argument name within a function
Dear all
How can I obtain the name of the argument passed in a function? Here is a
simplistic example of what I would like to obtain:
myfunction= function(name) {
print(paste("The parameter name was",unknownFunction(name))
}
myfunction(myobject)
[1] "The parameter name was myobject"
Thanks
Francisco
2014 Jul 30
0
binary to R object
...ve them into a file as follows:
writeBin(object=binary,con="fileName.txt")
Then eventually if I want to use it in R I just load it:
load("fileName.txt")
However, how can I go from the binary directly into an Robject without writing it to a file?
say:
myObject <- unknownFunction(binary)
I hope this is enough detail. Any help appreciated.
In retrospect, I could have probably used serialize/unserialize and store a serialize string in mysql and unserialize when needed ( or write to a file if necessary), but I didn't know of those when I did this.
Thanks in advance,
R...