Yes. My error was previously pointed out to me and there was further
offlist discussion. Maybe I should have kept it onlist, but I was
reticent about displaying my stupidity. :( Mea Culpa.
Cheers,
Bert
On Thu, Apr 11, 2013 at 9:11 AM, S Ellison wrote:
>
>
>> -Original Message-
>> Here's
> as.table(dat1)
> #Error in as.table.default(dat1) : cannot coerce to a table
You _can_ coerce to a matrix first:
as.table( as.matrix(dat1) )
S Ellison
***
This email and any attachments are confidential. Any use...{{dropped:8}
> -Original Message-
> Here's the relevant portion of the as.table Help file:
But ... is an argument to table(), not to as.table; this part of the help file
is not referring to as.table.
The first argument to as.table is x, which is an 'arbitrary R object'. as.table
is a generic; it
","integer"))
as.table(df1)
#Error in as.table.default(df1) : cannot coerce to a table
I am not sure about the problem.
A.K.
- Original Message -
From: Bert Gunter
To: arun
Cc: "dcarl...@tamu.edu"
Sent: Monday, April 8, 2013 1:33 PM
Subject: Re: [R] Reshaping a
[mailto:r-help-bounces@r-
> project.org] On Behalf Of arun
> Sent: Monday, April 08, 2013 7:41 AM
> To: IOANNA
> Cc: R help
> Subject: Re: [R] Reshaping a table
>
> Hi,
> Try this:
> dat1<-read.table(text="
> X Y1 Y2
>
> 0.1 3 2
>
SE)}))
row.names(res)<- 1:nrow(res)
res
# X Y
#1 0.1 Y1
#2 0.1 Y1
#3 0.1 Y1
#4 0.1 Y2
#5 0.1 Y2
#6 0.2 Y1
#7 0.2 Y1
#8 0.2 Y2
A.K.
- Original Message -
From: IOANNA
To: 'r-help-r-project.org'
Cc:
Sent: Monday, April 8, 2013 8:09 AM
Subject: [R] Reshaping a table
Hell
Hello all,
I have data in the form of a table:
X Y1Y2
0.1 3 2
0.2 2 1
And I would like to transform in the form:
X Y
0.1 Y1
0.1 Y1
0.1 Y1
0.1 Y2
0.1 Y2
0.2 Y1
0.2 Y1
0.2 Y2
Any ideas how?
Thanks in advance,
IOanna
7 matches
Mail list logo