[R] 0 rows> (or 0-length row.names)
William Dunlap
wdunlap at tibco.com
Tue Aug 30 19:00:42 CEST 2016
You did not say what operation gave you the error.
I can get that message (which is not an "error") if I print
an illegally constructed data.frame, one without the
row.names attribute.
> illegalDF <- structure(class="data.frame", list(ColumnA = 1:3))
> illegalDF
[1] ColumnA
<0 rows> (or 0-length row.names)
> str(illegalDF)
'data.frame': 0 obs. of 1 variable:
$ ColumnA: int 1 2 3
Note how str() of the entire data.frame indirectly informs you of the
problem: the number of observations does not match the length of the
columns.
How did you make the data.frame?
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Tue, Aug 30, 2016 at 9:24 AM, Shivi Bhatia <shivipmp82 at gmail.com> wrote:
> I know this question has been asked zillion times but even after consulting
> Stack Overflow & other forum cant figure out the reason.
>
> I have one var in my data-set names case age. This variable is numeric as:
>
> class(SFDC$case_age)
>
> *numeric*
>
> however it throws this error:
>
> <0 rows> (or 0-length row.names)
> As checked this only happens either there is some space at the end of the
> variable name, or there are no values whereas this is a numeric variable
> with no missing values and has a total of 5400 observations.
>
> This var has a range from 0 to 240 in number of days for case variable
> hence i need to do a logarithm transformation & make it use in the model.
> Total unique obs are around 1500.
>
> Please advice.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]
More information about the R-help
mailing list