similar to: OOP like handling of lists?

Displaying 20 results from an estimated 900 matches similar to: "OOP like handling of lists?"

2009 Sep 25
1
simulating a model
Dear useRs, I have written an ecological model, based on the epidemiology SIR model. I've been trying to simulate it in R. However, I can't simulate it properly. Two guesses: my script isn't right; I'm not setting the parameters properly I have uploaded an image to the model here: http://img24.imageshack.us/img24/743/imagemutr.jpg The script I am using is as it follows:
2004 Jun 14
1
olesolve: stepsize
Hi, I am doing a project on the simulation of glucose metabolism based on a pharmacokinetic modeling in which we have 4 differential equations. I did this in R by using the odesolve package. It works very well, but I have two questions: Here is the odemodel function _________________________________________________ Ogtt.Odemodel <- function(t, y, p) { absx <- c(-60, -45, -30,
2006 Mar 14
1
Problems compiling on Solaris 8
I have two machines that we are having problems compiling version 4.3p2. Both machines are Solaris 8 and gcc 3.3.2 openssl 0.9.8a is installed on both machines as well. The first exhibits an error in log.h: In file included from bsd-arc4random.c:18: ../log.h: In function `fatal': ../log.h:56: warning: empty declaration ../log.h:65: error: parse error before "volatile"
2010 Aug 10
3
sapply/lapply instead of loop
Using the input below, can I do something more elegant (and more efficient) than the loop also listed below to pad strings to a width of 5? The true matrix is about 300K rows and 31 columns. ####################### #INPUT ####################### > temp DX1 DX2 DX3 1 13761 8125 49178 2 63371 v75 22237 3 51745 77703 93500 4 64081 32826 v72 5 78477 43828 87645 >
2006 Aug 09
2
Speeding indexing and sub-sectioning of 3d array
Hi, I am having a problem with a very slow indexing and sub-sectioning of a 3d array: > dim(arr) [1] 245 175 150 For each point in the array, I am trying to calculate the mean of the values in its surrounding: mean( arr[ (i - radius):(i + radius), (j - radius):(j + radius), (k - radius):(k + radius)] ) Putting that code in 3
2012 Feb 01
0
Multi-response, multi-rater kappa?
I'm looking for an extension of kappa to measure agreement among multiple raters when there can be more than one response per subject. For example, say a group of doctors assign diseases to patients. Each patient will be assigned one to many diseases, and the number of doctors assigning diseases to any one patient will be two to many. Here's an extremely simple example of the type of
2001 Apr 19
2
Multiple linear regression
Dear R-users, I've a question regardiing multiple linear regression. Is it possible to regress a function of the type y=b0+b1*x1+b2*x2 constraining the partial derivatives dy/dx1 and dy/dx2 to be greater than 0 ??? Thank you very much for any possible suggestion. Best regards Marco -- Marco Pagani - PhD Student Dipartimento di Scienze della Terra - Sezione Geofisica Universita' degli
2004 Jan 23
0
cmptl_analy.R
Dear Michael, One key is adjustment of nls optimizer tolerance. I notice it has to be higher than usual, but, I recovered your noisy "known" parameter values with an error of K1 (-7%) and k1 (-6%): #### Miller problem with Dalgaard modifications ## Linares 1/22/2004 ## Solution 1 nls(noisy ~ lsoda(xstart, time, one.compartment.model, c(K1=K1, k2=k2))[,2], data=C1.lsoda,
2007 Sep 27
3
testing the contents of an environment
Suppose I want to delete everything in my working directory that is not a function. It seems that sapply(ls(),is.function) always returns FALSE, because ls() returns objects of mode character. How do I evaluate is.function(), not on a character string, but on the object that character string represents? Thanks, Tim
2010 Aug 10
0
Error in R2Bugs
Hello, I am running a GLMM using R2Bugs, but am getting the below error message. I am including the entire output, although the 2nd and 3rd lines seem to indicate the problem. Note that I do define N (it is an integer) and send it to a datalist (see the R commands and model below). Interestingly, when I put all of this into OpenBugs directly, the model runs. I do have reasons, however, that I
2004 Jan 22
4
Fitting compartmental model with nls and lsoda?
Dear Colleagues, Our group is also working on implementing the use of R for pharmacokinetic compartmental analysis. Perhaps I have missed something, but > fit <- nls(noisy ~ lsoda(xstart, time, one.compartment.model, c(K1=0.5, k2=0.5)), + data=C1.lsoda, + start=list(K1=0.3, k2=0.7), + trace=T + ) Error in eval(as.name(varName), data) : Object
2011 Sep 20
0
Using method = "aic" with pspline & survreg (survival library)
Hi everybody. I'm trying to fit a weibull survival model with a spline basis for the predictor, using the survival library. I've noticed that it doesn't seem to be possible to use the aic method to choose the degrees of freedom for the spline basis in a parametric regression (although it's fine with the cox model, or if the degrees of freedom are specified directly by the user),
2008 Dec 01
1
Attempting to get a STELLA model into R
To whomever may be of help, I am a student in a graduate modeling class at the University of North Carolina at Wilmington. I am trying to get a STELLA model converted into R. I am in the process of trying to 're-write' the script into R, but I seem to be missing pieces (i.e. parm values) that are keeping me from being able to replicate this model into R. Does anyone have an idea of a
2009 Mar 22
1
[PATCH] [memdisk] Additional comments in memdisk.inc and postprocess.pl
>From 8fb8c285e69c0f4cde28061019a8e399641d5ef1 Mon Sep 17 00:00:00 2001 From: Shao Miller <shao.miller at yrdsb.edu.on.ca> Date: Sun, 22 Mar 2009 00:27:56 -0400 Subject: [PATCH] [memdisk] Additional comments in memdisk.inc and postprocess.pl Just a sprinkling of comments adding further description to the code. --- memdisk/memdisk.inc | 34 +++++++++++++++++++++-------------
2008 Nov 09
3
Arms Race
hey can anybody help me? i have to simulate the richardson Arms race model on R.. for my simulation class...
2009 Jun 12
1
coupled ODE population model
I'm fairly new to R, and I'm trying to write out a population model that satisfies the following; the system consists of s species, i= 1, 2,...,s network of interactions between species is specified by a (s x s) real matrix, C[i,j] x[i] being the relative population of the "ith" species (0 =< x[i] =< 1, sum(x[i]=1) the evolution rule being considered is as follows;
2010 Dec 11
2
Predator Prey Models
Dear R-users, I am currently modifying a previously developed predator prey model and was curious if there was a way to add in a disturbance to the model (let's say at time t=100). The disturbance can be the introduction of 40 prey (N=40) and 10 predators (Pred = 10). I would like to see my model go from a state of equilibrium (up to t = 99), show this disturbance (at t = 100) and then
2010 Jan 31
0
error compiling on 3.5 on OS X
I've tried to compile 3.5.0 RC2 on MAc OS X 10.6.2 and I get an error towards the end--- any help/ideas would be greatly appreciated--- -----------<snip>------------- torture/../../lib/util/tests/strlist.c:285: warning: passing argument 1 of ?str_list_equal? from incompatible pointer type torture/../../lib/util/tests/strlist.c: In function ?test_list_remove?:
2018 Feb 01
2
Reload config with SIGHUP does not immediately revoke access to host removed from hosts allow
Hello All My samba-4.x server has lot of registry shares added. There are windows clients connected to it and I wanted to remove the access to one of the hosts. I did net conf setparm to set the updated list of IPs in "hosts allow" param and then reloaded samba config with killall -1 smbd . I see that the host which is not part of the hosts allow but already have a open window in
2010 Aug 26
1
Samba permission changes are not applied to active connections
Hello, I'm using Samba 3.4.2 with CTDB. If I remove a user from the valid users list with "net conf setparm Share 'valid users' ..." on the server, and I connect a new Windows client to the Samba server on Linux, I get a permission denied for that user, which is correct behavior. However, there is a problem for active connections. If I revoke access for a user with a live