thanks a lot.

good day.

Kathie


On Fri, Apr 16, 2010 at 1:43 PM, Henrique Dallazuanna [via R] <
ml-node+2013302-929204043-67...@n4.nabble.com<ml-node%2b2013302-929204043-67...@n4.nabble.com>
> wrote:

> Try this:
>
> sweep(a, 1, b, '/')
>
> On Fri, Apr 16, 2010 at 2:30 PM, Kathie <[hidden 
> email]<http://n4.nabble.com/user/SendEmail.jtp?type=node&node=2013302&i=0>>
> wrote:
>
> >
> > Dear R users,
> >
> > I am looking for more efficient way to compute the followings
> >
> >
> --------------------------------------------------------------------------
> >
> > a <- matrix(c(1,1,1,1,2,2,2,2),4,2)
> > b <- matrix(c(1,2,3,4),4,1)
> >
> > Eventually, I want to get this matrix, `c`.
> >
> > c <- matrix(c(1/1,1/2,1/3,1/4,2/1,2/2,2/3,2/4),4,2)
> >
> >
> --------------------------------------------------------------------------
> >
> > In fact, #column of `a` is so big..
> >
> > Is there a more efficient way to compute this instead of using "apply" or
>
> > something? or "apply" is only way..?
> >
> > Any suggestion will be greatly appreciated.
> >
> > Regards,
> >
> > Kathryn Lord
> > --
> > View this message in context:
> http://n4.nabble.com/VERY-SIMPLE-QUESTION-tp2013288p2013288.html
> > Sent from the R help mailing list archive at Nabble.com.
> >
> > ______________________________________________
> > [hidden 
> > email]<http://n4.nabble.com/user/SendEmail.jtp?type=node&node=2013302&i=1>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.
> >
>
>
>
> --
> Henrique Dallazuanna
> Curitiba-Paraná-Brasil
> 25° 25' 40" S 49° 16' 22" O
>
> ______________________________________________
> [hidden 
> email]<http://n4.nabble.com/user/SendEmail.jtp?type=node&node=2013302&i=2>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.
>
>
> ------------------------------
>  View message @
> http://n4.nabble.com/VERY-SIMPLE-QUESTION-tp2013288p2013302.html
> To unsubscribe from VERY SIMPLE QUESTION, click here< (link removed) ==>.
>
>
>

-- 
View this message in context: 
http://n4.nabble.com/VERY-SIMPLE-QUESTION-tp2013288p2013312.html
Sent from the R help mailing list archive at Nabble.com.

        [[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.

Reply via email to