Displaying 6 results from an estimated 6 matches for "fisken".
Did you mean:
fiske
2011 Apr 18
3
how to extract options for a function call
Hi, I'm having some difficulties formulating this question.
But what I want,
is to extract the options associated with a parameter for a function.
e.g.
method = c("Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN")
in the optim function.
So I would like to have a vector with
c("Nelder-Mead", "BFGS", "CG",
2011 Apr 07
3
force output dimension of table function
I have a small annoying problem.
When I use the 'table' function on a simple vector it counts the
number of occurences.
So depending on the values of my input vector the function returns a
class of type table with different lengths.
Is there an easy way to tell the table function, the values to expect?
That is
#############
> set.seed(0)
> s<-sample(0:5,5,rep=T)
> s
[1] 5 1
2009 Jul 16
2
Count the number of occurences in ranges
I got a vector of probabilities like,
probs<-c(0.001,0.5,0.02,1,.....)
Is there any nice and easy builtin function to get the number of
occurences within some specified probabality range.
Like with 2% it would be
occur[1] = sum(probs[probs>0&probs<0.02])
occur[2] = sum(probs[probs>0.02&probs<0.04])
...
occur[50] =sum(probs[probs>0.09] & probs<1)
(If it was a
2009 Jul 17
1
get a vector with filenames with a certain extension in a folder
Hi
I got a script that works on file with the extension ".qed" that are
al located in a folder '~/works/'
Is there are R function that will fetch all the filenames from the works subdir,
similar to
'ls ~/works/*.qed'
Thanks in advance
2011 Mar 27
1
run function on subsets of matrix
I was wondering if it is possible to do the following in a smarter way.
I want get the mean value across the columns of a matrix, but I want
to do this on subrows of the matrix, given by some vector(same length
as the the number of rows). Something like
nObs<- 6
nDim <- 4
m <- matrix(rnorm(nObs*nDim),ncol=nDim)
fac<-sample(1:(nObs/2),nObs,rep=T)
##loop trough different
2009 Jan 05
1
can't get names of R_env
Hi,
I'm quite knew in R, so I might not have the R specific jargon.
But here is my problem,
I'm trying to access and use variabels given by a function environment,
more specifically the rho in do_optim in src/main/optim.c
According to the documentation
http://cran.r-project.org/doc/manuals/R-ints.html#The-_0027data_0027
the envsxp is defined as a tagged pairlist.
"ENVSXP: Pointers