hello, how can I do to drop decimal after the comma please for example for tthis line> print(P)[1] 62.000000 1.000000 7.661290 5.200000 17.100000 2.318801 how canI do to keep only 62 1 7.66 5.2 17.1 2.32 thanks __________________________________________________ ble contre les messages non sollicités [[alternative HTML version deleted]]
Hallo, just look ?round. It should help. Corinna -----Urspr?ngliche Nachricht----- Von: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] Im Auftrag von elyakhlifi mustapha Gesendet: Freitag, 4. Mai 2007 14:59 An: R-help at stat.math.ethz.ch Betreff: [R] decimal values hello, how can I do to drop decimal after the comma please for example for tthis line> print(P)[1] 62.000000 1.000000 7.661290 5.200000 17.100000 2.318801 how canI do to keep only 62 1 7.66 5.2 17.1 2.32 thanks __________________________________________________ ble contre les messages non sollicit?s [[alternative HTML version deleted]]
?format elyakhlifi mustapha wrote:> hello, > how can I do to drop decimal after the comma please for example for tthis line > >> print(P) > [1] 62.000000 1.000000 7.661290 5.200000 17.100000 2.318801 > > how canI do to keep only 62 1 7.66 5.2 17.1 2.32 > thanks > > __________________________________________________ > > > ble contre les messages non sollicit?s > > [[alternative HTML version deleted]] > > > > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at 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 > and provide commented, minimal, self-contained, reproducible code.-- Dr Oleg Sklyar * EBI/EMBL, Cambridge CB10 1SD, England * +44-1223-494466
options(digits = 2) ?options Atenciosamente, Ana Patricia Martins ------------------------------------------- Servi?o M?todos Estat?sticos Departamento de Metodologia Estat?stica INE - Portugal Telef: 218 426 100 - Ext: 3210 E-mail: ana.pmartins at ine.pt -----Original Message----- From: elyakhlifi mustapha [mailto:elyakhlifi_mustapha at yahoo.fr] Sent: sexta-feira, 4 de Maio de 2007 13:59 To: R-help at stat.math.ethz.ch Subject: [R] decimal values hello, how can I do to drop decimal after the comma please for example for tthis line> print(P)[1] 62.000000 1.000000 7.661290 5.200000 17.100000 2.318801 how canI do to keep only 62 1 7.66 5.2 17.1 2.32 thanks __________________________________________________ ble contre les messages non sollicit?s [[alternative HTML version deleted]]