search for: i'th

Displaying 20 results from an estimated 82 matches for "i'th".

2013 May 20
1
Accessing i'th element of a vector without using a macro
Hello, I have a double vector, x. I can access the i'th element as REAL(x)[i] Is there a function for this? I know i can write my own, but was seeing if one already exists. I did check Rinternals.h but didn't see one. Cheers Saptarshi
2015 Jun 28
3
[PATCH] Take shift in crtc positions for ZaphodHeads configs into account.
In multi-x-screen ZaphodHeads configurations, there isn't a one-to-one mapping of kernel provided drmmode crtc index to the index of the corresponding xf86Crtc inside the xf86CrtcConfig crtc array anymore, ie. for kernel provided drmmode->mode_res->crtcs[i], the i'th crtc won't corr...
2009 Jun 23
2
an idiom to handle i'th element of a set of lists simultaneously
Hi, I have 3 lists, x, y, z and I'd like to perform a calculation over all the lists simultaneously. If it were a single list I could use lapply, but for more than one list I'm using a for loop. Is there an idiom that would let me use something like lapply, but the function specified to lappy...
2006 Mar 15
2
lapply vs. for (was: Incrementing a counter in lapply)
> From: Thomas Lumley >> >> On Tue, 14 Mar 2006, John McHenry wrote: >> >> > Thanks, Gabor & Thomas. >> > >> > Apologies, but I used an example that obfuscated the question that I >> > wanted to ask. >> > >> > I really wanted to know how to have extra arguments in >> functions that >> > would allow, per the example code, for something like a >> counter to be >&g...
2009 Dec 11
1
The correct way to set an element in a list to NULL? (FAQ is not clear)
http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-set-components-of-a-list-to-NULL_003f The explanation on this FAQ entry is not clear. It says '... similarly for named components...'. What I understood was x[i]<-list(NULL) is the same as x$a_name<-list(NULL). But, they are not. As the example below shows, x$a_name<-list(NULL) is...
2015 Aug 06
0
[PATCH] Take shift in crtc positions for ZaphodHeads configs into account.
I don't understand this patch (what are all these masks? how are they used?), and don't want to invest the time required to do so. However Mario is probably the sole serious user of ZaphodHeads, and if it fixes issues for him, probably fixes issues for others who try and give up with ZaphodH...
2009 Aug 14
1
extract data from shapefiles
I'm hoping that someone could guide me in how to extract data from shapefiles. I want to extract data from a shapefile (classed as "SpatialPolygonsDataFrame") and more specifically, the data is contained within the slot called "coords" from the class "polygons" with...
2009 Feb 03
3
non linear regression with nls
Hello, I'm a beginner with R and it's the first time I'm using the R-help list... I hope I'm in the right place, if not: Sorry!! I need to do non linear regressions on a data set which columns are: "river.name" "Portata" "PTG.P" "PO4.P" &quot...
2009 Oct 17
2
Recommendation on a probability textbook (conditional probability)
I need to refresh my memory on Probability Theory, especially on conditional probability. In particular, I want to solve the following two problems. Can somebody point me some good books on Probability Theory? Thank you! 1. Z=X+Y, where X and Y are independent random variables and their distribution...
2010 Apr 13
1
Lapack, determinant, multivariate normal density, solution to linear system, C language
r-devel list, I have recently written an R package that solves a linear least squares problem, and computes the multivariate normal density function. The bulk of the code is written in C, with interfacing code to the BLAS and Lapack libraries. The motivation here is speed. I ran into a problem computing the...
2007 Oct 31
2
cbind()
Hello, I would like to use the cbind() function to construct a matrix used in the middle of a function as following for (i in 1:1000) { b[i] <- function(cbind(a[[1]][[i]], a[[2]][[i]],a[[3]][[i]],...a[[67]][[i]])) } Is there an easy way of achieving this rather than "cbind" every column? --...
2009 Nov 11
1
How to get the names of list elements when iterating over a list?
I need to get the names of the list elements when I iterate over a list. I'm wondering how to do so? alist=list(a=c(1,3),b=c(-1,3),c=c(-2,1)) sapply(alist,function(x){ #need to use the name of x for some subsequent process })
2012 Jan 28
0
[LLVMdev] How to get the string value?
Hi Welson, > Yes, it is a ConstantExpr! Thank you! > > Now trying to find a clue in ConstantExpr's functions to get that string :-) you can get the pointer operand by doing: getOperand(0) The i'th index is getOperand(i+1). Ciao, Duncan. > > Regards, > Welson > > On...
2003 Jul 17
3
Looking to maximize a conditional likelihood
I want to maximize a conditional likelihood function that is basically logistic conditional on the number of successes within strata. What would be a good starting place for this? A complication is that the denominator includes a term that is the sum over all permutations. Although there is no tim...
2012 Nov 29
1
Error 0ps.factor: level sets of factors are different
I have two data sets: "new" and "combo". Within both data set, each row pertains to a unique individual. The "combo" data set is a subset of the "new" data set, meaning that all individuals within "combo" are within "new" but not all individ...
2012 Dec 28
4
efficiently multiply different matrices in 3-d array with different vectors?
Hello, I have been wondering of an efficient way to do this: I have an n x m x p array Z and a p x n matrix Y. I want to multiply each of the n matrices with the corresponding column vector of Y. In other words, I am wanting to matrix multiply: Z[i, ,] %*% Y[, i] which will give me a (two-dimensional)...
2012 Jan 28
1
[LLVMdev] How to get the string value?
Hey Duncan, Thanks! I figured out this piece of code finally: Value *gep = call->getArgOperand(0); if ( ConstantExpr *pCE = dyn_cast<ConstantExpr>(gep) ) { Value *firstop = pCE->getOperand(0); if (GlobalVariable *GV = dyn_cast<GlobalVariable>(firstop...
2020 Jul 29
3
[libnbd PATCH 0/2] Expose export description
An incremental improvement on top of listing exports. I still think it's worth experimenting with revisiting how our API for list mode should actually work [1] (so that we can reuse a single connection for both grabbing the list and finally using NBD_OPT_GO), but this change was easier to whip toge...
2020 Sep 28
0
[libnbd PATCH 1/3] api: Add get_nr_meta_contexts, clear_meta_contexts
An upcoming commit will add the ability to query which meta contexts a server is advertising; but first we need to be able to present a different list of meta context requests in response to what we learn from the server. Add APIs for reviewing which requests have already been registered, as well as a way t...
2007 May 01
2
Concepts question: environment, frame, search path
Folks: I'd appreciate if someone could straighten me out on a few concepts which are described a bit ambiguously in the docs. 1. data.frame: ---------------- Refan p84: 'A data frame is a list of variables of the same length with unique row names, given class "data.frame".' I prob...