similar to: operating on arrays of unknown dimensionality

Displaying 20 results from an estimated 9000 matches similar to: "operating on arrays of unknown dimensionality"

2009 Jul 21
1
subscript into matrix discards row/column names
Dear R-help, When the result of a matrix subscription degenerates to a scalar the names implied by the dimnames are discarded. > x <- matrix(0, 1, 1, dimnames=list('a', 'x')) ## below I expected result to have names='x', it's not > x[1,] [1] 0 ## below I expected result to have names='a', it's not > x[,1] [1] 0 This is probably a side effect
2018 Jul 07
2
Testing for vectors
On Sat, Jul 7, 2018 at 12:54 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 07/07/2018 1:20 PM, Hadley Wickham wrote: >> >> Hi all, >> >> Is there are base function that I've missed that tests if an object is >> a vector in the dimensionality sense, rather than the data structure >> sense? i.e. something that checks is.null(dim(x)) ?
2004 Nov 24
2
LDA with previous PCA for dimensionality reduction
Dear all, not really a R question but: If I want to check for the classification accuracy of a LDA with previous PCA for dimensionality reduction by means of the LOOCV method: Is it ok to do the PCA on the WHOLE dataset ONCE and then run the LDA with the CV option set to TRUE (runs LOOCV) -- OR-- do I need - to compute for each 'test-bag' (the n-1 observations) a PCA
2010 Mar 01
0
Is package "dr" appropriate for reducing the dimensionality of molecules conformational space ?
I anticipate lacking of prior experience with dimensionality reduction problems. Some scientists concerned with drug discovery performed several steered Molecular Dynamics simulations of the alanine-dipeptide molecule dragged by a radial force from an equilibrium conformation to another different equilibrium conformation. They sampled at regular intervals 7 dihedral angles, 5 bending angles, and
2005 May 08
3
Light-weight data.frame class: was: how to add method to .Primitive function
Hi, Encouraged by a tip from Simon Urbanek I tried to use the S3 machinery to write a faster version of the data.frame class. This quickly hits a snag: the "[.default"(x, i) for some reason cares about the dimensionality of x. In the end there is a full transcript of my R session. It includes the motivation for writing the class and the problems I have encountered. As a result I see
2010 Feb 14
1
Dimensional reduction package
Is there any R package which implements non-linear dimensionality reduction (LLE, ISOMAP, GTM, and so on) and/or intrinsic dimensionality estimation ? Thank you, Maura tutti i telefonini TIM! [[alternative HTML version deleted]]
2018 Jul 07
2
Testing for vectors
Hi all, Is there are base function that I've missed that tests if an object is a vector in the dimensionality sense, rather than the data structure sense? i.e. something that checks is.null(dim(x)) ? is.vector() is trivially disqualified since it also checks for the presence of non-names attributes: x <- factor(c("a", "a", "b")) is.vector(x) #> [1] FALSE
2010 Dec 13
1
Qs re writing/reading arrays, dataframes
Hi! I'm just getting started with R (and with the analysis of large datasets in general). I have several beginner-level questions whose answers I have not been able to find, and was hoping one of you would be kind enough to throw me a cluebrick or two. I have a 6-dimensional numeric array (which I'll call myarray) that is "fully named". By this I mean that non-NULL dimnames
2010 Aug 29
3
Three-dimensional contingency table
Hi, I am trying to assemble a three-way contingency table examining the presence/absence of mussels, water depth (Depth1 and Depth 2) and water velocity (Flow vs. No Flow). I have written the following code listed below; however, when run the glm I get the following message, "Error in model.frame.default(formula = Count ~ MP + wd + wv, drop.unused.levels = TRUE) : variable lengths differ
2008 Jul 23
2
shQuote and cat
Dear R-users, It is my understanding that cat(shQuote(a.string)) should print the origintal a.string. Is this right? I am not sure cat() correctly prints strings which are generated by triple-shQuote(): > shQuote(shQuote("a")) [1] "\"\\\"a\\\"\"" > cat(shQuote(shQuote(shQuote("a"))), '\n')
2008 Jul 23
2
shQuote and cat
Dear R-users, It is my understanding that cat(shQuote(a.string)) should print the origintal a.string. Is this right? I am not sure cat() correctly prints strings which are generated by triple-shQuote(): > shQuote(shQuote("a")) [1] "\"\\\"a\\\"\"" > cat(shQuote(shQuote(shQuote("a"))), '\n')
2016 Sep 08
0
R (development) changes in arith, logic, relop with (0-extent) arrays
>>>>> robin hankin <hankin.robin at gmail.com> >>>>> on Thu, 8 Sep 2016 10:05:21 +1200 writes: > Martin I'd like to make a comment; I think that R's > behaviour on 'edge' cases like this is an important thing > and it's great that you are working on it. > I make heavy use of zero-extent arrays, chiefly
2005 Jan 06
1
arrays emerging from tapply
The code below illustrates some points about results from tapply that I find strange. I wonder if they are intended and if so why it is so. 1) When you make a table the dimnames is a *named* list, tapply returns an unnamed list. 2) data.frame behaves differently on an array and a table. Is this an intended feature? 3) For tables class(TAB) and attr(TAB,"class") both return
2007 Jan 03
2
accessing arrays
hi all. how can i adress a array directly. for example i wanna give array 1 other labels than array 2. How can I overcome this problem? ...this doesn't work tab <- array(1:8, c(2, 2, 2)) dimnames(tab[,,1]) <- list(c("No","Yes"), c("No","Yes"),c("ARRAY1")) dimnames(tab[,,2]) <- list(c("big","small"),
2016 Sep 08
0
R (development) changes in arith, logic, relop with (0-extent) arrays
Shouldn't binary operators (arithmetic and logical) should throw an error when one operand is NULL (or other type that doesn't make sense)? This is a different case than a zero-length operand of a legitimate type. E.g., any(x < 0) should return FALSE if x is number-like and length(x)==0 but give an error if x is NULL. I.e., I think the type check should be done before the length
2010 Jun 26
3
converting result of substitute to 'ordidnary' expression
Dear R users, As substitute() help page points out: Substituting and quoting often causes confusion when the argument is 'expression(...)'. The result is a call to the 'expression' constructor function and needs to be evaluated with 'eval' to give the actual expression object. And indeed I am confused. Consider: > dat <- data.frame(x=1:10,
2010 Jun 26
3
converting result of substitute to 'ordidnary' expression
Dear R users, As substitute() help page points out: Substituting and quoting often causes confusion when the argument is 'expression(...)'. The result is a call to the 'expression' constructor function and needs to be evaluated with 'eval' to give the actual expression object. And indeed I am confused. Consider: > dat <- data.frame(x=1:10,
2010 Jun 26
2
subset arg in subset(). was: converting result of substitute to 'ordidnary' expression
Dear R users, Please disregard my previous post "converting result of substitute to 'ordidnary' expression". The problem I have has nothing to do with substitute. Consider: > dat <- data.frame(x=1:10, y=1:10) > subsetexp <- expression(5<x) > ## this does work > subset(dat, eval(subsetexp)) x y 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 > ##
2016 Sep 08
0
R (development) changes in arith, logic, relop with (0-extent) arrays
On 09/08/2016 01:22 PM, Gabriel Becker wrote: > On Thu, Sep 8, 2016 at 10:05 AM, William Dunlap <wdunlap at tibco.com> wrote: > >> Shouldn't binary operators (arithmetic and logical) should throw an error >> when one operand is NULL (or other type that doesn't make sense)? This is >> a different case than a zero-length operand of a legitimate type. E.g.,
2016 Sep 08
0
R (development) changes in arith, logic, relop with (0-extent) arrays
Prior to the mid-1990s, S did "length-0 OP length-n -> rep(NA, n)" and it was changed to "length-0 OP length-n -> length-0" to avoid lots of problems like any(x<0) being NA when length(x)==0. Yes, people could code defensively by putting lots of if(length(x)==0)... in their code, but that is tedious and error-prone and creates really ugly code. Is your suggestion to