Displaying 2 results from an estimated 2 matches for "002s42h".
Did you mean:
002422
2010 Feb 05
1
remove a row from a dataframe, row names disappear
I find this odd because it doesn't appear to happen in larger datasets. I
have the following data set ENV with the first column set as row.names:
> ENV
TPlog
001S29H 0.601
002S42H 0.602
003S43S 0.779
004S43S 0.702
005S51H 0.978
006S52P 2.718
If I apply > ENV <- ENV[-1,] # remove first row of data (right?)
...ENV comes back as:
[1] 0.602 0.779 0.702 0.978 2.718
So I am losing the row name info. I also notice that, if the first two
values in the TPlog column are...
2010 Feb 05
0
remove a row from a dataframe, row names disappear - solution
...eavie <euan.reavie@gmail.com> wrote:
> > I find this odd because it doesn't appear to happen in larger datasets. I
> > have the following data set ENV with the first column set as row.names:
> >
> >> ENV
> > TPlog
> > 001S29H 0.601
> > 002S42H 0.602
> > 003S43S 0.779
> > 004S43S 0.702
> > 005S51H 0.978
> > 006S52P 2.718
> >
> > If I apply > ENV <- ENV[-1,] # remove first row of data (right?)
> > ...ENV comes back as:
> >
> > [1] 0.602 0.779 0.702 0.978 2.718
> >
>...