Displaying 10 results from an estimated 10 matches for "dx1".
Did you mean:
0x1
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
>
#######################
#CODE
#######################
ssize <- c(nrow(temp), ncol(temp))
aa <- c(1:ssize[2])
aa <- paste("DX", aa, sep = "")
record &l...
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
2009 Sep 25
1
simulating a model
...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:
require(simecol)
mod1 <- new("odeModel",
main = function(time, init, parms) {
x <- init
p <- parms
dx1 <- p["K"] - p["alpha"]*x[1]*x[2] - p["gamma"]*x[1]
dx2 <- x[1]*x[2]*(p["alpha"] - p["beta"])
dx3 <- p["beta"]*x[1]*x[2] + p["gamma"]*x[1]
list(c(dx1, dx2, dx3))
},
times = c(from=0, to=100, by=0.1),
parms = c...
2009 Jan 23
2
Plot, lines and disordered x and y
Hello,
I have 2d data where x coordinate is not given in usual ascending
order (x1,...,x1+l; l>0), and instead in another, regular, but not
ascending or descending order (for illustration:
x1,-x1,x1+dx1,-x1-dx1,....).y is an array which corresponds to the way
x is ordered. I have noticed that giving 'plot(x,y,type='l') produces
a plot where the points are connected in a completely wrong way. It is
as the plot/lines assumes an ascending order between the succesive y
points ignoring the...
2012 Feb 01
0
Multi-response, multi-rater kappa?
...any one patient will be two to many.
Here's an extremely simple example of the type of data I might have (two
patients, three doctors, five diagnoses):
pat<-c('a','a','b','b','b')
doc<-c('x','y','x','y','z')
dx1<-c('1','2','3','4','5')
dx2<-c('2','','4','','')
df<-data.frame(pat=pat,doc=doc,dx1=dx1,dx2=dx2)
df
I found a paper that can address this, although I can't find any reference
to it on cran. The other vers...
2005 Oct 20
0
[PATCH][VT] disable bogus touchpad device model, which cause annoying dmesg on 2.6 kernel
...int absolute;
int high;
} TouchPad;
+#endif
typedef struct KBDState {
KBDQueue queue;
@@ -142,7 +147,9 @@
int mouse_dy;
int mouse_dz;
uint8_t mouse_buttons;
+#ifdef SYNAPTIC
TouchPad touchpad;
+#endif
} KBDState;
KBDState kbd_state;
@@ -399,6 +406,7 @@
dx1 = s->mouse_dx;
dy1 = s->mouse_dy;
dz1 = s->mouse_dz;
+#ifdef SYNAPTIC
if (s->touchpad.absolute)
{
int dz2, dleftnright, dg, df;
@@ -444,6 +452,7 @@
kbd_queue(s, dy1 & 0xFF, 1);
return;
}
+#endif
/* XXX: increase range to 8 bits ? */
if (dx1 &...
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 Studi di Milano
c/o
CSGAQ - CNR
via Bassini, 15 - I-20133 Milano - Italia
tel: +39-0...
2003 Oct 23
2
OOP like handling of lists?
...###############################################
#A simplified working example
#####################################################################
library(odesolve)
## The differential equation model ##################################
lvmodel<-list(
equations = function(t, x, p) {
dx1.dt <- p["k1"] * x[1] - p["k2"] * x[1] * x[2]
dx2.dt <- - p["k3"] * x[2] + p["k2"] * x[1] * x[2]
list(c(dx1.dt, dx2.dt))
},
parms = c(k1=0.2, k2=0.2, k3=0.2),
xstart = c(prey=0.5, predator=1)
# and some more elements...
2000 Feb 08
1
DEC cc doesn't like c++ comments (PR#416)
...ethod) */
if (method == 0) {
GPolyline(ns, xxx, yyy, USER, dd);
@@ -871,7 +871,7 @@
if (gotLabel) {
/* find which plot edge we are closest to */
- int closest; // 0 = index, 1 = index+range
+ int closest; /* 0 = index, 1 = index+range */
double dx1, dx2, dy1, dy2, dmin;
dx1 = fmin2((xxx[index] - dd->gp.usr[0]),
(dd->gp.usr[1] - xxx[index]));
@@ -971,8 +971,8 @@
*/
GConvert(&ux, &uy, USER, INCHES, dd);
GConvert(&vx, &vy, USER, INCHES, dd);
- // 1, 1 => sans serif, basic font
- // 0, ....
2006 Apr 29
1
SSPIR problem
I am having a problem with the package SSPIR. The code below
illustrates it. I keep getting the message: "Error in y - f :
non-conformable arrays."
I tried to tweak the code below in many different ways, for example,
substituting rbind for cbind, and sometimes I get a different error
message, but I could not find a variation of this code that would
work.
Any help will be greatly