Displaying 20 results from an estimated 73 matches for "iy".
Did you mean:
yi
2007 Nov 28
1
ifelse function
Hi there,
I need help with IFELSE function.
The column g of my dataset pth, pth$g consists of "aa", "ao", "dcl", "iy",
"sh".
The last few values of pth$g looks like:
[4496] sh ao ao sh iy dcl dcl aa iy iy aa sh ao ao
Levels: aa ao dcl iy sh
I want to convert these values into 1,2,3,4,5. I tried to use a loop and I
found the following statement did not work.
> pth$g[1]<-ifelse(pth...
2012 Oct 20
2
Help with programming a tricky algorithm
Hi All,
I'm a little stumped by the following problem. I've got a dataset with
the following structure:
idxy ix iy country (other variables)
1 1 1 c1 x1
2 1 2 c1 x2
3 1 3 c1 x3
. . . . .
3739 55 67 c7 x3739
3740 55 68 c7 x3740
where ix and iy are interger-valued indices...
2006 May 14
1
Dragable element
...method) a larger image - so effective its a detail viewer.
But, ive come into problems. I can get the logic to work out exactly
where the box is, but when i go to movve it, it works perfectly on the
first go, but on subsequent moves it goes the wrong way?!
My javascipt is...
var oiX = 0;
var oiY = 0;
function setOldVars(){
oiX = $(''squ'').style.top;
oiY = $(''squ'').style.left;
iX = oiX.replace(''px'', '''');
iY = oiY.replace(''px'', '''');
//$(''ggggg'').innerHTML =...
2006 Apr 11
1
gaussian family change suggestion
...((family$link == "inverse" && all(y == 0)) ||
(family$link == "log" && all(y <= 0)))) stop(
"cannot find valid starting values: please specify some")
mustart <- y
if (family$link=="log") {
iy <- y<=0
if (sum(iy)) mustart[iy] <- min(y[!iy])*.5
} else if (family$link=="inverse") {
iy <- y==0
if (sum(iy)) mustart[iy] <- min(abs(y[!iy]))*.5
}
})
best,
Simon
>- Simon Wood, Mathematical Sciences, University of Bath, Ba...
2012 Mar 10
1
applying a function in list of indexed elements of a vector:
Hi,
I have a vector
Y1 <-c(8, 11, 7, 5, 6, 3, 6, 3, 3)
and an index
iy <-c(c(1, 2),c(1 2), c(1, 2, 3, 4), c(2, 3, 5), c(4), c(5, 6, 7), c(7,
8, 9))
how can I produce the mean, or the sum of the elements specified in the
index iy from the vector Y1?
expecting something like this for the sum:
Y2
19 19 31 24 5 15 12
I thought lapply function may perform this, but...
2009 Aug 20
2
what is the meaning of this error
Error in Math.factor(c(2L, 1L, 1L, 1L, 1L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, :
log not meaningful for factors
In addition:Warning messages:
1: In Ops.factor(LRUpBound, LRLowBound) : * not meaningful for factors
2: In Ops.factor(TransitCoefStdDev, TransitCoefMean) :
/ not meaningful for factors
[[alternative HTML version deleted]]
2007 Nov 17
5
Wine AppDB etiquette ?
Dont know if iys the done thing, but I contacted the writer of an app I
maintain in AppDB, to point out that his app runs perfectly under Linux and
Wine.
Straught away he modified his webpage to include the fact, and a link to the
AppDB page for his application.
Cheers,
Ron.
--
I p...
2009 Mar 14
4
persp plot + plotting grid lines
Dear all;
Does anyone know how to add grid lines to a persp plot? I've tried
using lines(trans3d..) but the lines of course are superimposed into
the actual 3d surface and what I need is something like the plot shown
in the following link:
http://thermal.gg.utah.edu/tutorials/matlab/matlab_tutorial.html
I'll appreciate any ideas
Thanks
PM
1997 Jul 14
1
R-beta: Plotting: numeric 'col' colors; col=0, col=1, .. | Nice "funclet"
...butes
## -------------------------------------------------------------------------
## Arguments: codes: integer codes for pch & col
## -------------------------------------------------------------------------
## Author: Martin Maechler, Date: 14 Jul 97, 11:44
ix <- codes %/% 10
iy <- 10 - codes %% 10
if(!exists(".Device") || is.null(.Device)) x11(height=9)
init
plot(ix, iy, type='n', xlim = range(ix) + .15*c(-1,1),
yaxt = 'n',
xlab = 'floor( i / 10 )', ylab = ' i MOD 10',
main = "points(...., pch...
2009 Jun 05
1
Antialiasing plots and text on different devices
...symbols : points (... pch = *, cex =",
cex,")"))
{
nex <- length(extras)
np <- 26 + nex
ipch <- 0:(np-1)
k <- floor(sqrt(np))
dd <- c(-1,1)/2
rx <- dd + range(ix <- ipch %/% k)
ry <- dd + range(iy <- 3 + (k-1)- ipch %% k)
pch <- as.list(ipch) # list with integers & strings
if(nex > 0) pch[26+ 1:nex] <- as.list(extras)
plot(rx, ry, type="n", axes = FALSE,
xlab = "x-axis label", ylab = "y-axis label",
main = main)...
2011 Jun 08
0
PS to Taking Integral and Optimization using Integrate() and Optim()
Hello again.
Thank you for the comments. I have written these codes.
iy=function(x)
{
res=NULL
ress=0
for (i in (1:2))
{
for (xx in x[i])
{
fy=function(y) (exp(-exp(y+log(xx)))*(-exp(y+log(xx)))^2)/(1-exp(-exp(y+log(xx))))
res=c(res,integrate(fy,-6.907,-1.246)$value)
ress=ress+res
}
}
return(ress)
}
iy(c(1,1))
integrate(fy,-6.907,-1.246)$value
In 1D optimize() works p...
2018 Jul 25
2
Question about target instruction optimization
...> should ignore it until you have a working compiler.
>
> As far as two registers getting the same value, that should be picked
> up by common subexpression elimination in the optimiser anyway.
>
> You might want to consider having a pseudo-instruction for LD
> {BC,DE,HL,IX,IY},{BC,DE,HL,IX,IY} (all combinations are valid except
> those containing two of HL,IX,IY). You could expand this very late in
> the assembler, or during legalisation.
>
>
> On Wed, Jul 25, 2018 at 10:42 AM, Michael Stellmann via llvm-dev
> <llvm-dev at lists.llvm.org <mail...
2005 Jan 03
2
Memory Efficient Methods for Building Matrix
Dear List:
I am having to build a block-diagonal matrix (vl) and am currently using
the following code.
I<-diag(sample.size)
vl<-kronecker(I,vl.mat)
This code works fine, but for large N, it is a huge memory hog. Is there
a more efficient method for constructing vl?
Thanks,
Harold
[[alternative HTML version deleted]]
2002 Apr 18
2
Changing tick mark labels
Hello,
Can anyone help me out with this problem?
After performing logistic regressions and testing the significance with
likelihood ratios, I have plotted the results using "termplot". I am
wondering, how to get the names of my variables to appear on the x-axis
rather than ascending numbers?
I have used:
termplot(fm, se=T, axes=FALSE, col.se="black")
axis(1, 1:4,
2018 Jul 21
2
Finding scratch register after function call
For a Z80 backend, "eliminateCallFramePseudoInstr()" shall adjust the
stack pointer in three possible ways, e.g. after a function call,
depending on the amount (= adjustment size) *and some other rules*:
1. via one or more target "pop <reg>" instructions (SP increments +2 per
instruction), using an unused reg (disregarding the contents after the
operation), followed
2008 Aug 21
1
order(x,y, decreasing = c(FALSE, TRUE)) - how / elegantly?
...## ----------------------------------------------------------------------
## Arguments: x,y: vectors of the same length
## ----------------------------------------------------------------------
## Author: Martin Maechler, Date: 21 Aug 2008
ix <- order(x)
xx <- x[ix]
iy <- tapply(y[ix], xx, order, decreasing = TRUE)
## Note: 'SIMPLIFY', 'USE.NAMES', 'use.names' are just for efficiency:
unlist(mapply(`[`, split(ix,xx), iy,
SIMPLIFY = FALSE, USE.NAMES = FALSE),
use.names = FALSE)
}
x <- c(1, 1, 2,...
2018 Jul 25
2
Question about target instruction optimization
This is a question about optimizing the code generation in a (new) Z80
backend:
The CPU has a couple of 8 bit physical registers, e.g. H, L, D and E,
which are overlaid in 16 bit register pairs named HL and DE.
It has also a native instruction to load a 16 bit immediate value into a
16 bit register pair (HL or DE), e.g.:
LD HL,<imm16>
Now when having a sequence of loading two 16
2011 Dec 16
0
crash in using Rcpp and inline packages.
...ength0);
NumericVector bincout(binlength);
NumericVector binsum(binlength);
int nfocal=fx.size();
int ntotal=x.size();
double dist =0.0;
double ibin = 0.0;
double lpd = 0.0;
typedef NumericVector::iterator vec_iterator;
vec_iterator ifx = fx.begin(), ify = fy.begin();
vec_iterator ix= x.begin(), iy = y.begin();
vec_iterator ifsp = fsp.begin(), isp = sp.begin();
for (int i = 0; i < nfocal; i++){
for (int j= 0; j < ntotal; j++){
dist=pow(pow(ix[j]-ifx[i],2)+pow(iy[j]-ify[i],2),0.5);
if(dist == 0.0 || ifsp[i]==isp[j] || dist > rmax ){
continue;...
2011 Dec 16
0
Fw: crash in using Rcpp and inline packages.
...ength0);
NumericVector bincout(binlength);
NumericVector binsum(binlength);
int nfocal=fx.size();
int ntotal=x.size();
double dist =0.0;
double ibin = 0.0;
double lpd = 0.0;
typedef NumericVector::iterator vec_iterator;
vec_iterator ifx = fx.begin(), ify = fy.begin();
vec_iterator ix= x.begin(), iy = y.begin();
vec_iterator ifsp = fsp.begin(), isp = sp.begin();
for (int i = 0; i < nfocal; i++){
for (int j= 0; j < ntotal; j++){
dist=pow(pow(ix[j]-ifx[i],2)+pow(iy[j]-ify[i],2),0.5);
if(dist == 0.0 || ifsp[i]==isp[j] || dist > rmax ){
continue;...
2008 May 31
2
How to identify overlapped items from two list and plot them?
Hi list,
I have a question on how to identify the overlapped items from two vectors:
>x<-c(0,1,2)
>y<-c(1,2,2,3)
and plot the number of the overlapped as well as non-overlapped in a
diagram?
Thanks much,
Allen
[[alternative HTML version deleted]]