X4, if it is 20, dim=5X4.
>please help me do this.
>
>Thank you
>Regards
>karthick
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/R-matrix-help-tp4633372.html
>Sent from the R help mailing list archive at Nabble.com.
>
>___
Can you explain why n=12 should result in 3x4 instead of 2x6 or 6x2 or
4x3 or 1x12 ?
On Thu, Jun 14, 2012 at 8:51 AM, karthicklakshman
wrote:
> Dear R experts,
>
> I am interested in getting the dimensions for the matrix dynamically, based
> on the the number of elements in a matrix for example.
Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of karthicklakshman
> Sent: Thursday, June 14, 2012 7:51 AM
> To: r-help@r-project.org
> Subject: [R] R matrix help
>
> Dear R experts,
>
> I am interested in get
the number is 12,
I should get dim= 3X4, if it is 20, dim=5X4.
please help me do this.
Thank you
Regards
karthick
--
View this message in context:
http://r.789695.n4.nabble.com/R-matrix-help-tp4633372.html
Sent from the R help mailing list archive at Nabble.com
PDT)
> To: r-help@r-project.org
> Subject: [R] R matrix help
>
> Dear R experts,
>
> I am interested in getting the dimensions for the matrix dynamically,
> based
> on the the number of elements in a matrix for example. if the number is
> 12,
> I should get dim= 3X4,
But the meaning of a 3x4 table is rather different than the meaning of
a 1x12 table.
Regardless, you probably want to start with integer factorization, and
can read more
about implementations in R here (and elsewhere):
http://tolstoy.newcastle.edu.au/R/help/05/01/10007.html
Sarah
On Thu, Jun 14,
you
> Regards
> karthick
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/R-matrix-help-tp4633372.html
> Sent from the R help mailing list archive at Nabble.com.
>
> __
> R-help@r-project.org maili
context:
http://r.789695.n4.nabble.com/R-matrix-help-tp4633372.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
Is this what you are looking for:
> mdat3
sp.1 sp.2 sp.3 sp.4 sp.5
T110010
T210010
T311100
T410111
>
> # create a matrix of when species first appeared
> first <- apply(mdat3, 2, function(x) (cumsum(x == 1) > 0) + 0
On Wed, May 18, 2011 at 9:49 PM, jim holtman wrote:
> Is this what you were after:
>
>> mdat <- matrix(c(1,0,1,1,1,0), nrow = 2, ncol=3, byrow=TRUE,
> + dimnames = list(c("T1", "T2"),
> + c("sp.1", "sp.2", "sp.3")))
>>
>> mdat
> sp.1 sp.2 sp.3
> T1
Is this what you were after:
> mdat <- matrix(c(1,0,1,1,1,0), nrow = 2, ncol=3, byrow=TRUE,
+ dimnames = list(c("T1", "T2"),
+ c("sp.1", "sp.2", "sp.3")))
>
> mdat
sp.1 sp.2 sp.3
T1101
T2110
> # do 'rle' on each column and see
Dear R help,
Apologies for the less than informative subject line. I will do my
best to describe my problem.
Consider the following matrix:
mdat <- matrix(c(1,0,1,1,1,0), nrow = 2, ncol=3, byrow=TRUE,
dimnames = list(c("T1", "T2"),
c("sp.1", "sp.2", "
On Sun, Feb 20, 2011 at 2:56 PM, Dmitry Berman wrote:
> On Sun, Feb 20, 2011 at 5:55 PM, Dmitry Berman wrote:
>
>> Listers,
>>
>> I have a simple matrix:
>>
>> --
>> m <-c(1:7)
>> m <- cbind(m)
>>
>> m
>> [1,] 1
>> [2,] 2
>> [3,] 3
>> [4,] 4
>> [5,] 5
>> [6,] 6
>>
On Feb 20, 2011, at 5:56 PM, Dmitry Berman wrote:
On Sun, Feb 20, 2011 at 5:55 PM, Dmitry Berman
wrote:
Listers,
I have a simple matrix:
--
m <-c(1:7)
m <- cbind(m)
m
[1,] 1
[2,] 2
[3,] 3
[4,] 4
[5,] 5
[6,] 6
[7,] 7
---
I
On Sun, Feb 20, 2011 at 5:55 PM, Dmitry Berman wrote:
> Listers,
>
> I have a simple matrix:
>
> --
> m <-c(1:7)
> m <- cbind(m)
>
> m
> [1,] 1
> [2,] 2
> [3,] 3
> [4,] 4
> [5,] 5
> [6,] 6
> [7,] 7
> ---
>
> I want to add a second co
Listers,
I have a simple matrix:
--
m <-c(1:7)
m <- cbind(m)
m
[1,] 1
[2,] 2
[3,] 3
[4,] 4
[5,] 5
[6,] 6
[7,] 7
---
I want to add a second column using:
[[alternative HTML version deleted]]
___
I think you want ?solve ...
Remko
--
View this message in context:
http://r.789695.n4.nabble.com/matrix-help-tp2714378p2714896.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/ma
Anyone know how write a function that solves:
(1 + c)x1 +x2 +x3 = 5
x1+(1 + c)x2+x3 = 5 + 2c
x1+x2 +(1 + c)x3= 5 + 3c,
where c is a small constant, for 1000 equidistant values c = (10^-14,
2*10^-14, ..
18 matches
Mail list logo