search for: oarray

Displaying 19 results from an estimated 19 matches for "oarray".

Did you mean: array
2011 Feb 15
1
S4 problems
Hello everybody [R-2.12.1] I am having difficulty dealing with Oarray objects. I have a generic function, call it foo(), and I wish to define a method for Oarray objects. I do not have or want a method for regular arrays [actually, I want to coerce to an Oarray, and give a warning]. But setMethod() does not behave as desired, giving an error message when I try to...
2024 Apr 21
1
x[0]: Can '0' be made an allowed index in R?
Also https://cran.r-project.org/package=Oarray (which is older and hence possibly more stable) On 2024-04-21 3:55 a.m., Hans W wrote: > As we all know, in R indices for vectors start with 1, i.e, x[0] is not a > correct expression. Some algorithms, e.g. in graph theory or combinatorics, > are much easier to formulate and code if 0 is...
2024 Apr 21
1
x[0]: Can '0' be made an allowed index in R?
https://cran.r-project.org/package=index0 On Sun, Apr 21, 2024, 3:56 AM Hans W <hwborchers at gmail.com> wrote: > As we all know, in R indices for vectors start with 1, i.e, x[0] is not a > correct expression. Some algorithms, e.g. in graph theory or combinatorics, > are much easier to formulate and code if 0 is an allowed index pointing to > the first element of the vector.
2024 Apr 23
2
x[0]: Can '0' be made an allowed index in R?
Hello Peter, Unless I too misunderstand your point, negative indices for removal do work with the Oarray package (though -0 doesn't work to remove the 0th element, since -0 == 0 -- perhaps what you meant): > library(Oarray) > v <- Oarray(1:10, offset=0) > v [0,] [1,] [2,] [3,] [4,] [5,] [6,] [7,] [8,] [9,] 1 2 3 4 5 6 7 8 9 10 > dim(v) [1] 10...
2024 Apr 23
1
x[0]: Can '0' be made an allowed index in R?
Doesn't sound like you got the point. x[-1] normally removes the first element. With 0-based indices, this cannot work. - pd > On 22 Apr 2024, at 17:31 , Ebert,Timothy Aaron <tebert at ufl.edu> wrote: > > You could have negative indices. There are two ways to do this. > 1) provide a large offset. > Offset <- 30 > for (i in -29 to 120) { print(df[i+Offset])} >
2001 Oct 11
2
Where's MVA?
...except for ./src/muin2ser.f and ./misc which are free for non-commercial purposes. See file README for details. URL: http://www.r-project.org Index of Contents (Text) Reference Manual (PDF) Package Sources AnalyzeFMRI CoCoAn Devore5 EMV GLMMGibbs GenKern GeneSOM KernSmooth Matrix NISTnls Oarray PHYLOGR PTAk RArcInfo RMySQL RODBC RPgSQL RandomFields RmSQL Rstreams Rwave SASmixed SuppDists VR XML acepack adapt akima ash bindata blighty boot bootstrap bqtl car cclust cfa chron cluster cmprsk coda conf.design cramer date diamonds dse e1071 ellipse event.chart exactRankTests fastICA fdim field...
2004 Mar 02
0
an extension to 'array'
1. I want to extend the 'array' class, and prefer to use S4 in the belief that this is the best structure for new projects (as the documentation says). I actually wish to do something similar to the excellent Oarray by Jonathan Rougier, but as this class is S3, I can't see how to extend it by S4. Am I being dumb here? 2. Seeking then to define a similar class in S4, my principal task is to modify (extend?) a the extractor "[", modifying the range variables i,j,... . I run into problems here, th...
2005 Jul 17
1
indexing from 0
Hello, How would one index vectors and matrices starting from 0 (or some other value other than the default of 1) in R? Thanks, Rashmi [[alternative HTML version deleted]]
2004 Mar 31
11
Zero Index Origin?
I'm very new to R and utterly blown away by not only the language but the unbelievable set of packages and the documentation and the documentation standards and... I was an early APL user and never lost my love for it and in R I find most of the essential things I loved about APL except for one thing. At this early stage of my learning I can't yet determine if there is a way to
2024 Apr 23
1
x[0]: Can '0' be made an allowed index in R?
...ter Dalgaard <pd.mes at cbs.dk> Cc: R help project <r-help at r-project.org>; Hans W <hwborchers at gmail.com> Subject: Re: [R] x[0]: Can '0' be made an allowed index in R? Hello Peter, Unless I too misunderstand your point, negative indices for removal do work with the Oarray package (though -0 doesn't work to remove the 0th element, since -0 == 0 -- perhaps what you meant): > library(Oarray) > v <- Oarray(1:10, offset=0) > v [0,] [1,] [2,] [3,] [4,] [5,] [6,] [7,] [8,] [9,] 1 2 3 4 5 6 7 8 9 10 > dim(v) [1] 10...
2008 Oct 16
2
Matrix starting at [0,0] instead of [1,1]?
Hello all, When I create a matrix, is there a way to make it start at [0,0], instead of [1,1]? That way, a 2x2 matrix would go from [0,0] to [1,1], instead of [1,1] to [2,2]. Best, Guillaume
2011 Feb 18
4
Matrix in R
Hi everyone, I'm building a matrix in R with a cycle for like this: pp_ris2=matrix(NA,6,6) for(i in 0:6){ for(j in 0:6){ if(i>j){ pp_ris2[i,j]=myfunction} else if(i==j){ print(c(i,j)) pp_ris2[i,j]=myfunction} }} but the result is: [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.062 NaN NaN NaN NaN NaN [2,] 0.083 0.022 NaN NaN NaN NaN [3,]
2010 Nov 22
3
Is it possible to make a matrix to start at row 0?
I want to make the matrix to be indexed from row (column) 0, not 1 Can I do that? How? Thanks
2011 Oct 24
3
Create a matrix with increment and element with zero subscript
Hello, Does anyone knows how to deal with zero subscript in R. I have this code: for (i in 1:nitems){ + for (j in 1:ncat-1) { + draw<-matrix(rnorm(nitems*(ncat-1),seed1,seed2),nitems,(ncat-1)) + d<-( sigma_d*draw ) + mu_d + draw<-matrix(rtnorm((nitems*(ncat-1)),mean = seed1, sd = seed2, lower = .1, upper = 1.5),nitems,(ncat-1)) +
2012 Jan 30
2
handling a lot of data
Hi, I have got a lot of SPSS data for years 1993-2010. I load all data into lists so I can easily index the values over the years. Unfortunately loaded data occupy quite a lot of memory (10Gb) - so my question is, what's the best approach to work with big data files? Can R get a value from the file data without full loading into memory? How can a slower computer with not enough memory work
2006 Jun 26
2
reshaping data.frame question
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dear R-helpers, my data.frame is of the form x <- data.frame( f=gl(4,3), X=rep(0:2,4), p=c(.1,.2,.3)) x f X p 1 1 0 0.1 2 1 1 0.2 3 1 2 0.3 4 2 0 0.1 5 2 1 0.2 6 2 2 0.3 7 3 0 0.1 8 3 1 0.2 9 3 2 0.3 10 4 0 0.1 11 4 1 0.2 12 4 2 0.3 which tabulates some values p(X) for several factors f. Now I want to put it in "wide"
2024 Apr 21
5
x[0]: Can '0' be made an allowed index in R?
As we all know, in R indices for vectors start with 1, i.e, x[0] is not a correct expression. Some algorithms, e.g. in graph theory or combinatorics, are much easier to formulate and code if 0 is an allowed index pointing to the first element of the vector. Some programming languages, for instance Julia (where the index for normal vectors also starts with 1), provide libraries/packages that allow
2007 Mar 26
1
Problem in loading all packages all at once
...;neural","nFDR","NISTnls","nlme","nlmeODE","nlreg","nnet","nor1mix","norm","normalp","NORMT3","nortest","noverlap","npmc","numDeriv","nws","Oarray","odesolve","onion","optmatch","orientlib","ouch","outliers","oz","pamr","pan","panel","papply","partitions","partsm","party","pastecs","pb...
2010 Nov 24
0
4. Rexcel (Luis Felipe Parra)-how to run a code from excel
...9) { > z <- myMatrix[i+1,] > ... > } > > But as Josh said, I think this falls into the class of "You are just > asking for trouble, so don't do it." > > Cheers, > Bert But if you still want to after all those warnings, you can ... see the "Oarray" package, where the first letter of the package name is a capital letter "oh" (O), not a zero (0). library("fortunes"); fortune("Yoda") There ought also to be a clever fortune() expressing the sentiment that you may eventually find (weeks, months, or years lat...