similar to: How to parse the arguments from a function call and evaluate them in a dataframe?

Displaying 20 results from an estimated 800 matches similar to: "How to parse the arguments from a function call and evaluate them in a dataframe?"

2009 Aug 02
1
Competing Risks Regression with qualitative predictor with more than 2 categories
Hello, I have a question regarding competing risk regression using cmprsk package (function crr()). I am using R2.9.1. How can I do to assess the effect of qualitative predictor (gg) with more than two categories (a,b,c) categorie c is the reference category. See above results, gg is considered like a ordered predictor ! Thank you for your help Jan > # simulated data to test > set.seed(10)
2009 May 15
1
Plotting question re. cuminc
Hello everyone, (This is my second question posted today on the R list). I am carrying out a competing risks analysis using the cuminc function...this takes the form: cuminc(ftime,fstatus,group) In my study, fstatus has 3 different causes of failure (1,2,3) there are also censored cases (0). "group" has two levels (0 and 1). I therefore have 6 different cumulative incidence curves:
2009 Oct 27
1
Error in solve.default peforming Competing risk regression
Dear all, I am trying to use the crr function in the cmprsk package version 2.2 to analyse 198 observations.I have receive the error in solve.default. Can anyone give me some insights into where the problem is? Thanks here is my script : cov=cbind(x1,x2) z<-crr(ftime,fstatus,cov)) and data file: x1 x2 fstatus ftime 0 .02 1 263 0 .03 1 113 0 .03 1 523
2013 Oct 18
1
crr question‏ in library(cmprsk)
Hi all I do not understand why I am getting the following error message. Can anybody help me with this? Thanks in advance. install.packages("cmprsk") library(cmprsk) result1 <-crr(ftime, fstatus, cov1, failcode=1, cencode=0 ) one.pout1 = predict(result1,cov1,X=cbind(1,one.z1,one.z2)) predict.crr(result1,cov1,X=cbind(1,one.z1,one.z2)) Error: could not find function
2008 Dec 09
1
controlling axes in plot.cuminc (cmprsk library)
Dear R-help list members, I am trying to create my own axes when plotting a cumulative incidence curve using the plot.cuminc function in the CMPRSK library. The default x-axis places tick marks and labels at 0, 20, 40, 60, and 80 (my data has an upper limit of 96), whereas I want them at my own specified locations. Here is my example code: library(cmprsk) attach(MYDATA) MYCUMINC <-
2010 Oct 06
4
problem with abline
Hi All, I am running a scatter plot and trying to add a best fit line. I use an abline function, but get no line drawn over the points. I also get no error. I arm using V 2.10.0 on Windows 7. Here is my code, including the SAS transport file import: require (foreign) require (chron) require (Hmisc) require (lattice) clin <- sasxport.get("y:\\temp\\subset.xpt") attach(clin)
2009 Jun 25
2
crr - computationally singular
Dear R-help, I'm very sorry to ask 2 questions in a week. I am using the package 'crr' and it does exactly what I need it to when I use the dataset a. However, when I use dataset b I get the following error message: Error in drop(.Call("La_dgesv", a, as.matrix(b), tol, PACKAGE = "base")) : system is computationally singular: reciprocal condition number =
2015 Feb 23
5
iterated lapply
Hi everybody, with the following code I generate a list of functions. Each function reflects a "condition". When I evaluate this list of functions by another lapply/sapply, I get an unexpected result: all values coincide. However, when I uncomment the print(), it works as expected. Is this a bug or a feature? conditions <- 1:4 test <- lapply(conditions, function(mycondition){
2006 Apr 24
4
javascript in RoR page - Check ALL/uncheck ALL buttons
I am trying to implement a check all and uncheck all button for my check boxes. Here is what I have below. I am getting this error each time: Error: document.myform.add_visit_for_this_Pt has no properties Source File: http://localhost:3000/AddPatientVisit/addvisits Line: 1 Strange that I can''t seem to pass value into the function. Thanks for your help! <SCRIPT
2009 Jan 08
4
Problem with disable_with
Hi Group, I have a registration.html.erb page with the following JavaScript at the top which I use to validate form fields: <script type="text/javascript"> <!-- function validate(){ if ((document.myForm.email_projectname.value=="")|| (document.myForm.email_projecttype_id.selectedIndex<1)|| (document.myForm.email_region_id.selectedIndex<1)) { alert
2008 Jul 17
2
nested calls, variable scope
Below is an example of a problem I encounter repeatedly when I write functions. A call works at the command line, but it does not work inside a function, even when I have made sure that all required variables are available within the function. The only way I know to solve it is to make the required variable global, which of course is dangerous. What is the elegant or appropriate way to solve
2015 Feb 24
3
iterated lapply
From: Daniel Kaschek <daniel.kaschek at physik.uni-freiburg.de> > ... When I evaluate this list of functions by > another lapply/sapply, I get an unexpected result: all values coincide. > However, when I uncomment the print(), it works as expected. Is this a > bug or a feature? > > conditions <- 1:4 > test <- lapply(conditions, function(mycondition){ >
2009 May 15
1
Function Surv and interpretation
Dear everyone, My question involves the use of the survival object. We can have Surv(time,time2,event, type=, origin = 0) (1) As detailed on p.65 of: http://cran.r-project.org/web/packages/survival/survival.pdf My data (used in my study) is 'right censored' i.e. my variable corresponding to 'event' indicates whether a person is alive (0) or dead (1) at date last seen
2011 May 08
1
Syntax for iter.max in rms
Hello, I would like to increase the number of iterations for running a Buckley-James regression model in the rms package, but something is apparently syntactically wrong. The following code initially is exactly as it appears in the help page (which runs successfully), then a "failure to converge" message (resulting from specifying an 'identity' link argument, the error message
2013 Apr 05
2
model.frame: object is not a matrix
Over a decade ago there was a problem with model.frame when the variable names were long: https://stat.ethz.ch/pipermail/r-help/2002-August/024492.html I have similar symptoms with R 2.15.3 on Windows 7: Browse[2]> x <- model.matrix(formula(myform), p$data) Error in model.frame.default(object, data, xlev = xlev) (from mice.R#601) : object is not a matrix My attempt at a work-around
2008 Mar 10
5
Passing extra parameters to functions called from Observers
Hi again, When you have an ''obeserver'' setup as follows: $(''myForm'').observe(''submit'', validateForm); If a user submits the form the ''validateForm'' function is called and is automagically passed the ''event'' to work with. This is fantastic! But is there a way to pass another argument to the function?
2015 Feb 26
3
iterated lapply
Would introducing the new frame, with the call to local(), cause problems when you use frame counting instead of <<- to modify variables outside the scope of lapply's FUN, I think the frame counts may have to change. E.g., here is code from actuar::simul() that might be affected: x <- unlist(lapply(nodes[[i]], seq)) lapply(nodes[(i + 1):(nlevels - 1)],
2012 Sep 19
0
[LLVMdev] newbie question on getelementptr
Hi Óscar, Thank you for your prompt reply. Unfortunately, I still need more guidance as using the Demo page to generate C++ code didn't result in a global variable being used. Basically, I'm following your advice to use a LoadInst: Value *v = new LoadInst(result, "", theBasicBlock); Function *myfn = cast<Function>(v); I was not sure how I could get a BasicBlock for the
2002 Apr 26
1
optim or nlm with matrices
Hi, I have the following hypothetical optimization problem: -det(t(x-A%*%x1)%*%(x-A%*%x1)) where A,x,x1 are matrices. A coefficients and x and x1 are variable matrices or vectors. I tried to apply optim and nlm functions but I kept receive the following massage: Error in A%*%x1 : non-conformable arguments. The massage appears even the -det() can be calculated and the dimensions are checked. here
2015 Feb 24
2
iterated lapply
> On Feb 24, 2015, at 10:50 AM, <luke-tierney at uiowa.edu> wrote: > > The documentation is not specific enough on the indented semantics in > this situation to consider this a bug. The original R-level > implementation of lapply was > > lapply <- function(X, FUN, ...) { > FUN <- match.fun(FUN) > if (!is.list(X)) > X <-