[R] Substituting the values on the y-axis
jrkrideau at inbox.com
Mon Jun 10 17:52:53 CEST 2013
Just calculate a new sequence if those percentages are in an orderly sequence. See ?seq
v <- seq(25, 200, by = 10)
or perhaps the values are actually text
x <- substr(v, 1,2)
Kingston ON Canada
> -----Original Message-----
> From: diddle1990 at fastwebnet.it
> Sent: Mon, 10 Jun 2013 16:26:54 +0200 (CEST)
> To: r-help at r-project.org
> Subject: [R] Substituting the values on the y-axis
> I plotted a graph on R showing how salinity (in ‰, y-axis) changes with
> years, x-axis). However, right from the beginning on the Excel
> spreadsheet the v
> alues for salinity appeared as, for example, 35000‰ instead of 35‰, which
> I gues
> sed must have been a typing error for the website from which I extracted
> the dat
> a (NOAA).Thus, I now would like to substitute these values with the
> g smaller value, as it follows:
> 25000 35000-> 25, 35 and so on.
> Is there any way I can change this on R or do I have to modify these
> numbers bef
> ore inputting the data on R (for example on Excel)? If so, can anybody
> tell me h
> ow to do either of these?
> Many thanks!
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
More information about the R-help