similar to: Zero Index Origin?

Displaying 20 results from an estimated 12000 matches similar to: "Zero Index Origin?"

2001 Jul 29
4
style question: returning multiple arguments - structure orlist
I see Thomas has already nailed this one, so it becomes a non-issue. Nevertheless I feel moved to say I think the idea would have been a step in the wrong direction in the first place. It comes from a desire to make R behave "a bit more like matlab" and that is ultimately unhelpful. Having tried to teach generations of students how to use the system (S-PLUS, but it could equally well
2024 Feb 28
2
converting MATLAB -> R | element-wise operation
On Tue, 27 Feb 2024 13:51:25 -0800 Jeff Newmiller via R-help <r-help at r-project.org> wrote: > The fundamental data type in Matlab is a matrix... they don't have > vectors, they have Nx1 matrices and 1xM matrices. Also known as column vectors and row vectors. :) > Vectors don't have any concept of "row" vs. "column". They do in (numerical) linear
2024 Apr 23
1
x[0]: Can '0' be made an allowed index in R?
I think it might be fair to say that the discussion is becoming a tad wider than whether you want your data structures indexed starting from 0 or 1. Programming languages have added functionality to do many things on top of the simple concept of accessing or changing the nth element one at a time. If someone wants to make a parallel way to handle things, it may work for some uses but not others
2003 May 26
4
spinning and flipping arrays
Hello people, Is there some simple way of spinning and/or flipping arrays in R? Here's what I mean. Suppose that foo is a 2x3x4 array with the following contents: (I know this is different than typing 'foo' at and R prompt, but I'm so used to row major order from using APL, I have a hard time with R's output) > foo[1,,] [,1] [,2] [,3] [,4] [1,] 1 2 3 4
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 define a method for Oarray
2001 Oct 18
1
vectors / matrices
Hi, a friend of mine came across this R> x <- 1:5 R> cbind(x,x) x x [1,] 1 1 [2,] 2 2 [3,] 3 3 [4,] 4 4 [5,] 5 5 R> rbind(x,x) [,1] [,2] [,3] [,4] [,5] x 1 2 3 4 5 x 1 2 3 4 5 x is a vector and therefore has no dim-attribute. Obviously cbind treats x as a col-vector but rbind treats x as a row-vector, that is: two functions have a different
2011 Jul 17
3
How to convert number (matlab) to date
Hello I am new to R and I need to convert some dates (numeric format by matlab) to actual dates in R. For instance, Matlab -> 730456 -> >> datestr(730456) ans = 02-Dec-1999 R - > library(zoo) > as.Date(730456) [1] "3969-12-03" I don't not mind the output format but it needs to be right. Many thanks Ed
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.
2002 Dec 09
2
APL?
Hi, is anybody out there who knows APL and would help me to translate 52 lines of APL code into propper R? best, Torsten
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 an allowed index pointing to > the first element
2012 Jul 02
1
Undocumented behavior around daylight savings time?
Apologies for the intrusion. I am a lurker on list. I have been working to convert a digitized signal from a matlab file into R for analysis and other applications. R.matlab is working fine, and it is easy to convert the matlab date-time number (days since year 0) into R date-time numbers (seconds since 1970-01-01). Unfortunately, when I cast the R date-time number into POSIXct format it seems
2008 Aug 20
1
FYI: APL in R
http://idisk.mac.com/jdeleeuw-Public/utilities/apl/apl.R Dedicated to the IBM 2741. Implemented for general multidimensional arrays: drop, take, reshape, shape, rank, select, generalized inner product, generalized outer product, representation, base value, join, expand, reduce, scan, member of, ravel, compress, tranpose, rotate Basically, the APL-I part is complete, and after some testing
2004 Jun 04
5
How to Describe R to Finance People
> the main advantage it has over SPSS-like software is that you do not > need to explicitly create dummy variables. You only need to specify > your dependent variable and independent variables and R will fit it > (and create dummy variables automatically) for you. Does the audience know exactly what the creation of dummy variables in SPSS is and means? If not, they might consider
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])} >
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]]
2015 Apr 28
5
CENTOS not DoD approved
nowhere does it say that centos is approved for use in DoD. it is not on the APL, only RedHat and SuSE
2018 Mar 05
2
[Release-testers] [6.0.0 Release] The final tag is in
Isn't libc++.so dependent on libc++abi.so? On Mon, Mar 5, 2018 at 10:30 AM, Jonas Hahnfeld <hahnjo at hahnjo.de> wrote: > From what I can see all of the libraries without RPATH are runtime > libraries that are used by binaries compiled with Clang. I think they don't > have a dependency on other libraries in that directory, so what would be > the advantage of having
2001 Oct 11
2
Where's MVA?
Hi All: Package TSERIES is stated to depend on MVA. However, there is no MVA package to be found under the list of package sources. Best wishes, ANDREW tseries: Package for time series analysis Package for time series analysis with emphasis on non-linear and non-stationary modelling Version: 0.7-6 Depends: ts, mva, quadprog Date: 2001-08-27 Author: Compiled by Adrian
2018 Mar 05
2
[Release-testers] [6.0.0 Release] The final tag is in
It was just brought to my attention that the RPATH configuration isn't uniform among the libraries produced by the release. Some use $ORIGIN../lib/ and others have none. Is this by design? It seems like it might be ideal for all of them to be configured the same way. If that makes sense I'll create a corresponding feature request. $ for f in
2012 Jul 25
3
rails scope without raw sql
Hi, I''ve been stung when deploying a rails app to heroku, and I''m fairly confident the problem is the difference between my local db sqlite3, and the heroku standard free shared db which is postgres(i think). I have a scope in my model that looks like this scope :not_archived, :conditions => [''application_state != "archived"''] The idea is I want