Is there easy way (without copying the existing rows to a temporary
location and copying back) to add a new row to a specific index location in
an existing data frame?
Example
df = data.frame( A= c('a','b','c'), B=c(1,2,3), C=(10,20,30))
newrow = c('X', 100, 200)
I want to add the newrow as the
issue with this method.
> >
> > Thanks,
> > Sammy
> >
> > On Sat, Nov 12, 2011 at 10:16 PM, David Winsemius
> wrote:
> >
> > >
> > > On Nov 12, 2011, at 6:40 PM, Sammy Zee wrote:
> > >
> > > Thanks David. Besides rbind(), is there a
, David Winsemius wrote:
>
> On Nov 12, 2011, at 6:40 PM, Sammy Zee wrote:
>
> Thanks David. Besides rbind(), is there any other way to add a row to a
>> data frame so that I do not lose the custom attributes.
>>
>
> I have already told you the method that I know of. Yo
Thanks David. Besides rbind(), is there any other way to add a row to a
data frame so that I do not lose the custom attributes.
Thanks,
Sammy
On Sat, Nov 12, 2011 at 5:17 PM, David Winsemius wrote:
>
> On Nov 12, 2011, at 2:47 PM, Sammy Zee wrote:
>
> When I use rbind() or rbin
-
> Jeff NewmillerThe . . Go Live...
> DCN:Basics: ##.#. ##.#. Live
> Go...
> Live: OO#.. Dead: OO#.. Playing
> Research Engineer (Solar/BatteriesO.O#. #.O#. with
> /Soft
Hi all,
When I use rbind() or rbind.data.frame() to add a row to an existing
dataframe, it appears that attributes for the column of type "factor" are
dropped. I see the following post with same problem. However i did not see
any reply to the following posting offering a solution. Could someone
pl
6 matches
Mail list logo