[R] cutting out numbers from vectors

Charles C. Berry cberry at tajo.ucsd.edu
Sat Jun 21 19:33:52 CEST 2008


On Fri, 20 Jun 2008, calundergrad wrote:

>
> i have a vector with a string of number
> e.g
>
> [1] 01130010000 001130011000 001130012000 001130013000 001130016000
> [6] 001130018000
>
> i want a vector with the same numbers except with the last three digits  of
> every factor cut off.
> e.g
>
> [1] 01130010 001130011 001130012 001130013 001130016
> [6] 001130018
>
> how do i accomplish this?

By following the posting guide?

 	help.search("division")
 	?"+"

HTH,

Chuck

> -- 
> View this message in context: http://www.nabble.com/cutting-out-numbers-from-vectors-tp18034157p18034157.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.
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901



More information about the R-help mailing list