I want to evaluate f with the mean=7
mean=7
f <- expression(-(x-mean)^2/2)
then get a new expression:
-(x-7)^2/2
How could I do it? Thanks.
--
View this message in context:
http://r.789695.n4.nabble.com/evaluate-one-variable-in-an-expression-with-two-variables-tp4370877p4370877.html
Sent fr
I have modified a C function in the `phmm` package. Now I want to rebuild the
package, but the following error occurred. How can I fix the error?
$ cd ~/Desktop/phmmw
$ R CMD build phmm
* checking for file ‘phmm/DESCRIPTION’ ... OK
* preparing ‘phmm’:
* checking DESCRIPTION
Thanks for you help. I also spent a lot of time on it. Your explanation is
very clear.
--
View this message in context:
http://r.789695.n4.nabble.com/formula-error-inside-function-tp4326549p4328117.html
Sent from the R help mailing list archive at Nabble.com.
_
I want use survfit() and basehaz() inside a function, but it doesn't work.
Could you take a look at this problem. Thanks for your help. Following is my
codes:
library(survival)
n <- 50 # total sample size
nclust <- 5 # number of clusters
clusters <- rep(1:nclust,each=n/nclust)
beta0 <- c(1,
4 matches
Mail list logo