[R] referencing last row in a column
peter dalgaard
pdalgd at gmail.com
Thu Sep 23 11:53:22 CEST 2010
On Sep 23, 2010, at 11:44 , fugelpitch wrote:
>
> Sorry, but now I understand what you're doing, and it works as a stand-alone
> in the console! :)
>
> But why doesn't it work in the xlim?
You have a colon where a comma would work.
BTW: Wouldn't xlim=range(pheno.dt$year) be more expedient?
>
> ______________________________________________________________________________
>> pheno.dt$year[1]
> [1] 1877
>
>> pheno.dt$year[nrow(pheno.dt)]
> [1] 1916
>
>> plot(x,y, xlim = c(pheno.dt$year[1]:pheno.dt$year[nrow(pheno.dt)]), ylim =
>> 50:150, xlab = "Year", ylab = "Julian Day")
> Error in plot.window(...) : invalid 'xlim' value
> Calls: plot -> plot.default -> localWindow -> plot.window
> ______________________________________________________________________________
> --
> View this message in context: http://r.789695.n4.nabble.com/referencing-last-row-in-a-column-tp2551645p2551712.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
--
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help
mailing list