Displaying 6 results from an estimated 6 matches for "xk1".
Did you mean:
x11
2008 Jan 30
1
re stricting points in a data frame
useR's,
Consider some variables and a data frame of points:
x1 <- c(1,2,3)
x2 <- c(3,4,5)
xk1 <- seq(min(x1)-.5, max(x1)+.5,.5)
xk2 <- seq(min(x2)-.5, max(x2)+.5,.5)
expand.grid(xk1=xk1,xk2=xk2)
xk1 xk2
1 0.5 2.5
2 1.0 2.5
3 1.5 2.5
4 2.0 2.5
5 2.5 2.5
6 3.0 2.5
7 3.5 2.5
...
46 2.0 5.5
47 2.5 5.5
48 3.0 5.5
49 3.5 5.5
I want to restrict the data frame to only contain poin...
2007 Aug 28
1
alternate methods to perform a calculation
Consider a data frame (x) with 2 variables, x1 and x2, having equal values.
It looks like:
x1 x2
1 1
2 2
3 3
Now, consider a second data frame (xk):
xk1 xk2
0.5 0.5
1.0 0.5
1.5 0.5
2.0 0.5
0.5 1
1.0 1
1.5 1
2.0 1
0.5 1.5
1.0 1.5
1.5 1.5
2.0 1.5
0.5 2
1.0 2
1.5 2
2.0 2
I have written code to calculate some differences between these two data
sets; the main idea is to subtract off each element of xk1...
2007 Aug 29
0
a faster and shorter way to perform calculations?
...to accomplish:
Z(xk) = Average(Yi, i belongs to Ik), where Ik contains all i such that for
each j, |Xi,j - xkj?? 2. Here, j = 1, 2 and i corresponds to the elements
in each X and/or xk
>data
x1 x2 y
1 1 2
2 2 6
3 3 12
Now, consider a second data frame or matrix (xk):
xk1 xk2
0.5 0.5
1.0 0.5
1.5 0.5
2.0 0.5
0.5 1
1.0 1
1.5 1
2.0 1
0.5 1.5
1.0 1.5
1.5 1.5
2.0 1.5
0.5 2
1.0 2
1.5 2
2.0 2
In the end, there should be matrix or data frame with 3 columns, xk1, xk2,
and z (the result of the algorithm). Having any NA'...
2007 Aug 31
2
memory.size help
...size' error message when I run a program I have
been writing. It always it cannot allocate a vector of a certain size. I
believe the error comes in the code fragement below where I have multiple
arrays that could be taking up space. Does anyone know a good way around
this?
w1 <- outer(xk$xk1, data[,x1], function(y,z) abs(z-y))
w2 <- outer(xk$xk2, data[,x2], function(y,z) abs(z-y))
w1[w1 > d1] <- NA
w2[w2 > d2] <- NA
i1 <- ifelse(!is.na(w1),yvals[col(w1)],NA)
i2 <- ifelse(!is.na(w2),yvals[col(w2)],NA)
zk <- numeric(nrow(xk)) #DEFININING AN EMPTY VECTOR TO HO...
2008 Feb 21
0
extending code to handle more variables
useR's,
Consider the variables defined below:
yvals <- c(25,30,35)
x1 <- c(1,2,3)
x2 <- c(3,4,5)
x3 <- c(6,7,8)
x <- as.data.frame(cbind(x1,x2,x3))
delta <- c(2.5, 1.5, 0.5)
h <- delta/2
vars <- 3
xk1 <- seq(min(x1)-0.5, max(x1)+0.5, 0.5)
xk2 <- seq(min(x2)-0.5, max(x2)+0.5, 0.5)
xk3 <- seq(min(x3)-0.5, max(x3)+0.5, 0.5)
xks <- list(xk1,xk2,xk3)
xk <- do.call("expand.grid", xks)
I want to perform several calculations with these variables. For only two
variables, my co...
2016 Nov 09
0
[PATCH] filearch: Add s390 and s390x detection and tests.
...;Q@U*Vkw%*{|U~5IpW2O@rip*dzNx^m#vq_bq~d_<RZp{K)&X
ztrfWfK4hBVd!<?6A7NbHC&5#UXACtp^zUVSGJ?}t66NrIfxev6jhJiTa!#MO1;CHn
zJhz>MY8}MjXR#UL#+k)th>P2_g>PE^E?IcP!aooH(Q(rLdjVBk+-|h}$nT=|_5<k0
z#sBRN^ZF<BW7g3*20U)QI5@|}$2kH0nDufVbwYi6y`0CPFY9Hki!<5QcdhU^OOIGw
zyXmakS{A;I!N>Xk1~yO3es;dq!OyGkBkOX(^8Y;xx5xi_2R}dUfd2vG`S5!>wo$K*
z;X-C?ZFP05e)fsX=IL4?zwQU8OU25@=9vC<8(XafIb7mYE~cxvta*B7*;`z=xPtql
z_Vth#l)Y8DAgV(nU-i~X)tq1Q@<Fv$_xz1bwOTD-Efs=7K0WctPi5kj^u?3s*J}P2
z?ty~ZmU_14mkVBgqg>vCiN)!gsza*(@l<fbWF~TMdFuSEH@ox{-F)e3NjqP!dh32A
zPgh+}eRgT;{K5=0a0MpXbBoVRPc3@SoI7...