Hello,
One more thing, if you do cbind(year = rownames(dat), dat), then the
year variable defaults to a factor. Maybe it's better if you transform
it into numeric:
cbind(year = as.numeric(rownames(dat)), dat)
Rui Barradas
Em 27-08-2013 21:09, catalin roibu escreveu:
Thank you very much!
I
If the goal is to change row names and the replacements are unique the it is
as easy as:
rownames(dfrm) <- newnames
Include example data for more complete answers.
--
David
Sent from my iPhone
On Aug 27, 2013, at 2:41 PM, Rui Barradas wrote:
> Hello,
>
> If your data.frame is named 'dat'
Hello,
If your data.frame is named 'dat', try the following.
cbind(year = rownames(dat), dat)
Hope this helps,
Rui Barradas
Em 27-08-2013 20:34, catalin roibu escreveu:
hello all!
I have a problem! I don't know how to convert row names in first column
variables.
Thank you very much for your
hello all!
I have a problem! I don't know how to convert row names in first column
variables.
Thank you very much for your help!
CR
--
---
Catalin-Constantin ROIBU
Lecturer PhD, Forestry engineer
Forestry Faculty of Suceava
Str. Universitatii no. 13, Suceava, 720229, Romania
office phone +4
4 matches
Mail list logo