ce and effort.
B.R.
Stephen L
- Original Message
From: Joshua Wiley
To: Stephen Liu
Cc: r-help@r-project.org
Sent: Mon, November 8, 2010 8:33:50 AM
Subject: Re: [R] About 5.1 Arrays
On Sat, Nov 6, 2010 at 7:38 AM, Stephen Liu wrote:
> Hi Joshua,
>
> Thanks for your advice
On Sat, Nov 6, 2010 at 7:38 AM, Stephen Liu wrote:
> Hi Joshua,
>
> Thanks for your advice.
>
> 1)
> Re your advice:-[quote]
>> a3d
> , , 1 <--- this is the first position of the third dimension ***THIS IS THE
> THIRD DIMENSION***
>
> [,1] [,2] [,3] [,4] <--- positions 1, 2, 3, 4 of the seco
Hi Stephan
Since early in November you have posted queries on R-help on 5 different
topics as you are trying to learn to use R. This is a good
thing, and many contributors to R-help have replied, taking pains
to provide explanations and examples to be helpful. But, in return,
it doesn't appear
dlund
To: r-help@r-project.org
Sent: Sun, November 7, 2010 2:08:04 AM
Subject: Re: [R] About 5.1 Arrays
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Stephen Liu
> Sent: Saturday, November 06, 2010 7:38 AM
&g
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Stephen Liu
> Sent: Saturday, November 06, 2010 7:38 AM
> To: Joshua Wiley
> Cc: r-help@r-project.org
> Subject: Re: [R] About 5.1 Arrays
>
> Hi J
258 11
[3,]369 12
, , 2
[,1] [,2] [,3] [,4]
[1,] 13 16 19 22
[2,] 14 17 20 23
[3,] 15 18 21 24
Correct.
If I'm wrong, pls correct me. Thanks
B.R.
Stephen
- Original Message
From: Joshua Wiley
To: Stephen Liu
Cc: r-hel
Sent: Sat, November 6, 2010 12:48:35 AM
Subject: Re: [R] About 5.1 Arrays
Continuing with Daniel's example, but with different data values
a <- sample(24)
a
dim(a) <- c(3,4,2)
a
as.vector(a)
## for an array with
## dim(a) == c(3,4,2)
## a[i,j,k] means select the element in posi
Continuing with Daniel's example, but with different data values
a <- sample(24)
a
dim(a) <- c(3,4,2)
a
as.vector(a)
## for an array with
## dim(a) == c(3,4,2)
## a[i,j,k] means select the element in position
##i + (j-1)*3 + (k-1)*3*4
index <- function(i,j,k) {
i + (j-1)*3 + (k-1)*3*4
}
- Original Message
> From: Daniel Nordlund
> To: r-help@r-project.org
> Sent: Fri, November 5, 2010 11:54:15 PM
> Subject: Re: [R] About 5.1 Arrays
>
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
>
riginal Message
From: Daniel Nordlund
To: r-help@r-project.org
Sent: Fri, November 5, 2010 11:54:15 PM
Subject: Re: [R] About 5.1 Arrays
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Stephen Liu
> Sent: Friday, Nov
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Stephen Liu
> Sent: Friday, November 05, 2010 7:57 AM
> To: Steve Lianoglou
> Cc: r-help@r-project.org
> Subject: Re: [R] About 5.1 Arrays
>
> Hi S
Hi,
On Fri, Nov 5, 2010 at 10:56 AM, Stephen Liu wrote:
> Hi Steve,
>
>> It's not clear what you're having problems understanding. By
>> setting the "dim" attribute of your (1d) vector, you are changing
>> itsdimenensions.
>
> I'm following An Introduction to R to learn R
>
> On
>
> 5.1 Arrays
>
nal Message
From: Steve Lianoglou
To: Stephen Liu
Cc: Gerrit Eichner ; r-help@r-project.org
Sent: Fri, November 5, 2010 10:18:18 PM
Subject: Re: [R] About 5.1 Arrays
Hi,
On Fri, Nov 5, 2010 at 6:00 AM, Stephen Liu wrote:
[snip]
>> A[i, j, k] is the value of the element in position (i,j,k)
Hi,
On Fri, Nov 5, 2010 at 6:00 AM, Stephen Liu wrote:
[snip]
>> A[i, j, k] is the value of the element in position (i,j,k) of array A. In
>> other words, it is the entry in row i, column j, and "layer" k (if one
>> wants to think of A as a cuboidal grid).
>
> Sorry I can't follow. Could you pls
Hi Gerrit,
Thanks for your advice.
- snip -
> A[i, j, k] is the value of the element in position (i,j,k) of array A. In
> other words, it is the entry in row i, column j, and "layer" k (if one
> wants to think of A as a cuboidal grid).
Sorry I can't follow. Could you pls explain in more d
On Fri, 5 Nov 2010, Stephen Liu wrote:
[snip]
"0" is counted as 1 object.
Of course! It is a number like any other.
Does "object length" mean the total number of objects/entries?
Yes.
Please help me to understand follow;
"For example if the dimension vector for an array, say a, is c(3,4
Hi folks,
(Learning R)
5.1 Arrays
http://cran.r-project.org/doc/manuals/R-intro.html#Vectors-and-assignment
1)
If continued on previous example (3.1 Intrinsic attributes: mode and length),
> z <- 0:9
> dim(z) <- c(3,5,100)
Error in dim(z) <- c(3, 5, 100) :
dims [product 1500] do not match th
17 matches
Mail list logo