Displaying 2 results from an estimated 2 matches for "your_funct".
Did you mean:
your_fun
2011 Jul 05
1
How to translate string to variable inside a command in an easy way in R
I want to write a function that get 2 strings y and z and does the following
R command.
temp<-qq1[qq1$z==y,]
for example if it get y="AMI" and z="PrimaryConditionGroup"
It should do the following
temp<-qq1[qq1$PrimaryConditionGroup=="AMI",]
I could do it by the following function that is ugly and I wonder if there
is an easier way to do it espacielly when temp
2011 Oct 05
4
dynamically creating functions in r
it is possible to dynamically create functions in R using lists? what I want
to do is something like this:
a = list()
for (i in 1:10) a[[i]] = function(seed = i) runif(seed)
so that when I call a[i] I get random draws 1,2,....i unfortunately R only
uses the last i . I would also like to know if there is a run-all function
without explicitly looping or using lapply. for example if I