search for: elment

Displaying 10 results from an estimated 10 matches for "elment".

Did you mean: element
2013 Jan 25
3
How to extract elements from vector in reverse order?
Hi all mailing listers, I wanna get the last several elments of vector. e.g. x <- c(1,2,3,.....,78, 79, 80) How can I implement to assign last three elements to y, y <- c(78, 79, 80) ? In Matlab, It can easily achieve by y=x(end-2:end) Thanks Huaping Wan [[alternative HTML version deleted]]
2008 Mar 13
3
Whitespace in SuperRedCloth
Up to now, the tests have been running with whitespace stripped out. Newlines and tabs are insignificant in HTML, so I figured why bother with them? Now I realize why: they''re significant in pre tags and they also make your code look pretty! I''ve been working to get SRC output to roughly match Tetxile2''s as far as tabs and newlines go. It''s tough and
2008 Sep 12
2
[LLVMdev] Order of fiels and structure usage
...e answers to these questions are "Yes". std::vector<const Type*> Elts; Elts.push_back(PointerType::get(StructTy)); Is it possible to build an expression that uses the newly generated Elt as field-selector at this point? I'm hoping yes, but I suspect No, because the elments of Elts* are clearly Type* instead of being a field. In particular, if I use the same type twice to make two fields, the corresponding elements of Elts will be indistinguishable. Elts.push_back(Type::Int32Ty); StructType *NewSTy = StructType::get(Elts); Presumably at this point is is...
2013 Feb 03
1
Looping through rows of all elements of a list that has variable length
...rame. I need to loop through all rows of the list element 1 AND (if applicable) of the list element 2 etc. and do something at each iteration. I am trying to figure out how to write a code that is generic, i.e., loops through the rows of all elements of my lists even if the total number of the list elments is unknown in advance. Below is an example. a=expand.grid(1:2,1:2) b=expand.grid(1:2,1:2,1:2) ################################################# # My list that can have 1 element, e.g.: l.short<-vector("list",1) l.short[[1]]<-a # I need to loop through rows of l.short[[1]] and do s...
2008 Sep 12
0
[LLVMdev] Order of fiels and structure usage
...uctTy is completely safe. > std::vector<const Type*> Elts; > Elts.push_back(PointerType::get(StructTy)); > > Is it possible to build an expression that uses the newly generated Elt > as field-selector at this point? I'm hoping yes, but I suspect No, > because the elments of Elts* are clearly Type* instead of being a field. > In particular, if I use the same type twice to make two fields, the > corresponding elements of Elts will be indistinguishable. I'm not following; are you trying to access the first member of NewSTy here? You can't use a type t...
2003 Aug 24
2
setClass question
...ector not monotone increasing") if(object@ia[length(object@ia)] != length(object@ra)+1) return("last element of ia doesn't conform") if(length(object@ia) != nrow+1) return("ia has wrong number of elments") if(length(object@ra) < 1 || length(object@ra) > nrow*ncol) return("ra has too few, or too many elements") TRUE}) setMethod("initialize", "matrix.csr", function(.Object, ra = numeric(0), ja =...
2019 Oct 04
0
Error in [.terms
..."response") X <- model.matrix(mterm[-strata], mf) @ The root problem is the need for multiple subscripts. \begin{itemize} ? \item The formula itself has length 5, with `~' as the first element ? \item The variables and predvars attributes are call objects, each a list() with 4 elments: the response and all 3 predictors ? \item The term.labels attribute omits the resonse and the offset, so has? length 2 ? \item The factors attribute has 4 rows and 2 columns ? \item The dataClasses attribute is a character vector of length 4 \end{itemize} So the ideal result of? mterm[remove...
2009 Feb 10
7
ifelse()
I have a problem with ifelse(), I do not understand how it works. > X<-c(2,2,1,1,0,0) > str(X) num [1:6] 2 2 1 1 0 0 > Y<-ifelse(X>0,1,0) > Y [1] 1 1 1 1 0 0 > Can some one explain what is going on, I do not understand what ifelse is doing in this case. Can someone explain the output Y. Thanks -- View this message in context:
2008 Sep 13
3
[LLVMdev] Order of fiels and structure usage
...; >> std::vector<const Type*> Elts; >> Elts.push_back(PointerType::get(StructTy)); >> >> Is it possible to build an expression that uses the newly generated Elt >> as field-selector at this point? I'm hoping yes, but I suspect No, >> because the elments of Elts* are clearly Type* instead of being a >> field. In particular, if I use the same type twice to make two fields, >> the corresponding elements of Elts will be indistinguishable. > > I'm not following; are you trying to access the first member of NewSTy > here? You...
2014 Jan 24
3
[LLVMdev] RFC: Using hashing for switch statements
Hi folks, here is a short RFC regarding hashing for the implementation of switch statements and my preliminary patch. I posted this patch on 2014-01-16 21:58 at llvm-commits at cs.uiuc.edu. You can find a copy e.g. on http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140113/201782.html. Best regards Jasper === Preliminary: Special identifiers n number of given switch labels