Re: [R] (no subject)

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Fri 24 Jun 2005 - 01:49:28 EST

"Bernard L. Dillard" <bld@math.umd.edu> writes:

> Hello Rers:
>
> Let's say I have a column that looks like this:
>
> Column
> 167.8
> 292.8
> 363.3
> 1.9
> 115.25
>
> I want to manipulate the above data such that I only end up with this same
> column but only with its decimals and not its whole numbers. So the new
> column would look like this (but the real column is VERY long):
>
> Column
> .8
> .8
> .3
> .9
> .25
>
> Any suggestions about how I could do this?

Column - floor(Column)

or even

Column %% 1

negative numbers may get you in some trouble, though.

-- 
   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Jun 24 01:56:39 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:00 EST