?scale or ?sweep or ?lapply

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
 
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Mark Deacon
> Sent: Friday, November 09, 2007 6:47 AM
> To: [EMAIL PROTECTED]
> Subject: [R] Recycling Rule
> 
> Hi, I have an efficiency question.
> 
> To centralise a dataset (in a data frame) I have been using:
> 
> a <- mean(Data)
> Data <- t(t(Data)-a)
> 
> ...to force row-wise recycling.
> 
> Is there a better/more efficient/more elegant way than 
> transposing the dataset twice?
> 
> Thanks
>       [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help@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.
> 

______________________________________________
R-help@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.

Reply via email to