[R] Matrix Mulitplication: A*B*C*D...?

2013-06-16 Thread G Vishwanath
Is there a R package or function that will multiple an arbitrary number of matrices supplied to it, preferably optimizing the sequence R_function(matA, matB, matC,  matD,)    return matA %*%  matB %*%  matC %matD %    and optimizing wether it is better to do A(BC) or (AB)C ? Thanks,

[R] R for Chrome OS

2013-06-16 Thread Kevin Chavers
Hello, I have heard that Chrome OS is Linux based, so I am wondering if there is anyway to use R on a Google Chromebook using one of your Linux packages. If not, do you plan on making a version of R that is compatible with chromebooks or cloud based? [[alternative HTML version deleted]]

Re: [R] Simulating from a special type of bivariate exponential distribution

2013-06-16 Thread INDRANIL GHOSH
Hi, I have the following problem in simulating samples from a bivariate exponential distribution with the following construction: Start with three independent exponential random variables say W1,W2 and W3 with intensity parameters lambda 1, lambda 2 and lambda 3 respectively. Now I construct a

[R] Creating subset using selected columns

2013-06-16 Thread Suparna Mitra
Hello R experts, I need a help to create a subset file. I know with subset comand, its very easy to select many different columns, or threshold. But here I have a bit problem as in my data file is big. And I don't want to identify the column numbers or names manually. I am trying to find any

[R] Problems using log() in a plm() regression.

2013-06-16 Thread Guylaine NOUWOUE
Hello, I am performing a panel model and I have an error. In fact, I would like to set up the pooling model and I have an error message. Any help poolplm(panel$lexportijt~ldistit+lpopit+lpopjt+lpibit+lpibjt+lpibcit+lpibc

Re: [R] Creating subset using selected columns

2013-06-16 Thread Rui Barradas
Hello, You could try something like the following. The example below assumes your data.frame is named 'dat' cnums - grep(Peak\\.Area, colnames(dat)) subdat - dat[cnums] See ?regexp for the regular expressions used by ?grep. Hope this helps, Rui Barradas Em 16-06-2013 08:20, Suparna Mitra

Re: [R] Creating subset using selected columns

2013-06-16 Thread Rainer Schuermann
Supposed your data.frame is called x, try x[ which( substr( colnames( x ), 1, 4 ) == Peak ) ] On Sunday 16 June 2013 15:20:37 Suparna Mitra wrote: Hello R experts, I need a help to create a subset file. I know with subset comand, its very easy to select many different columns, or threshold.

Re: [R] R for Chrome OS

2013-06-16 Thread Jeff Newmiller
You should probably try to study a bit more about what ChromeOS is about before asking questions like that. The real question you should have asked is whether R is offered as SAAS in the cloud. (I don't think so.) You can setup an instance of Linux in the cloud and run R there. RStudio Server

Re: [R] Problems using log() in a plm() regression.

2013-06-16 Thread Milan Bouchet-Valat
Le dimanche 16 juin 2013 à 09:05 +0200, Guylaine NOUWOUE a écrit : Hello, I am performing a panel model and I have an error. In fact, I would like to set up the pooling model and I have an error message. Any help poolplm(panel$lexportijt~ldistit+lpopit+lpopjt+lpibit+lpibjt+lpibcit+lpibc

Re: [R] rename and concatenate name of columns

2013-06-16 Thread R. Michael Weylandt
On Sat, Jun 15, 2013 at 1:45 AM, David Winsemius dwinsem...@comcast.net wrote: On Jun 14, 2013, at 1:25 PM, Bert Gunter wrote: For the record: ... A bit of commentary: Something did happen. It's just that you didn't do anything with _what_ happened. The copy of the

Re: [R] Matrix Mulitplication: A*B*C*D...?

2013-06-16 Thread Uwe Ligges
On 16.06.2013 04:35, G Vishwanath wrote: Is there a R package or function that will multiple an arbitrary number of matrices supplied to it, preferably optimizing the sequence R_function(matA, matB, matC, matD,) return matA %*% matB %*% matC %matD % and optimizing wether it

Re: [R] Simulating from a special type of bivariate exponential distribution

2013-06-16 Thread Don McKenzie
This looks like a homework problem, and has no R question in it. If it is homework, ask your professor or fellow students for help. If not, and you have a question about R, please post that. On Jun 15, 2013, at 8:17 PM, INDRANIL GHOSH jamesbond.indra...@gmail.com wrote: Hi, I have the

Re: [R] Reading shape files in R

2013-06-16 Thread Roger Bivand
jickngea alexand jickneba at yahoo.ie writes: Hi everyone,    I am new with spatial data analysis in R and I'm not able to read a shape because of this error message but the shapefile is in my work directory.  Here are my commands; ogrLireadstLayers(border.shp),

Re: [R] can't install rugarch and nloptr packages in R 3.01 opensuse linux

2013-06-16 Thread David Winsemius
On Jun 16, 2013, at 3:42 AM, ce wrote: I can't install rugarch package because installation of nloptr package fails . I use opensuse 12.3 # uname -a Linux candide 3.7.10-1.11-desktop #1 SMP PREEMPT Thu May 16 20:27:27 UTC 2013 (adf31bb) x86_64 x86_64 x86_64 GNU/Linux my gcc version is

[R] trying to fit a thin plate spline to a triangular plot

2013-06-16 Thread Rapkin, James
Hi Has anyone tried to fit a thin plate spine to a triangular plot before? I'm having trouble working out a piece of code to make it possible with three axes. I have done it before with two axes. I've found a package I prefer that makes triangular plots (plotrix) using the triax.plot()

Re: [R] trying to fit a thin plate spline to a triangular plot

2013-06-16 Thread David Winsemius
On Jun 16, 2013, at 7:39 AM, Rapkin, James wrote: Hi Has anyone tried to fit a thin plate spine to a triangular plot before? I'm having trouble working out a piece of code to make it possible with three axes. Only two axes in a triangular plot are independent. I have done it before

Re: [R] extract all numbers from a string

2013-06-16 Thread Nick Matzke
Thanks *VERY* much, this is great! I realized a few more cases, I think I've got something that covers all the possibilities now: library(stringr) tmpstr = The first number is: 32. Another one is: 32.1. Here's a number in scientific format, 0.3523e10, and another, 0.3523e-10, and a

Re: [R] matched samples, dataframe, panel data

2013-06-16 Thread arun
Hi, This gives me more combinations than you got with SAS.  Also, this selects the one with minimum dimension between duplicates. final3New-read.table(file=real_data_cecilia.txt,sep=\t,header=T) final3New1-read.csv(real_data_cecilia_new.csv) fun3- function(dat){        

[R] problem with input of integrate function

2013-06-16 Thread cassie jones
Dear R-users, I am trying to integrate a function using integrate command in R. The function is as follows, integrand function(x,a) { exp(-0.5*a*(1+x^2))/(1+x^2) } Now while I want to integrate it using the command integrate, I get the following error, integrate(integrand(x,2),0,inf) Error

Re: [R] problem with input of integrate function

2013-06-16 Thread David Winsemius
On Jun 16, 2013, at 6:46 PM, cassie jones wrote: Dear R-users, I am trying to integrate a function using integrate command in R. The function is as follows, integrand function(x,a) { exp(-0.5*a*(1+x^2))/(1+x^2) } Now while I want to integrate it using the command integrate, I get

Re: [R] problem with input of integrate function

2013-06-16 Thread David Winsemius
On Jun 16, 2013, at 7:15 PM, David Winsemius wrote: On Jun 16, 2013, at 6:46 PM, cassie jones wrote: Dear R-users, I am trying to integrate a function using integrate command in R. The function is as follows, integrand function(x,a) { exp(-0.5*a*(1+x^2))/(1+x^2) } Now while I

Re: [R] problem with input of integrate function

2013-06-16 Thread cassie jones
Hi David, Thank you so much. -Cassie On Sun, Jun 16, 2013 at 9:19 PM, David Winsemius dwinsem...@comcast.netwrote: On Jun 16, 2013, at 7:15 PM, David Winsemius wrote: On Jun 16, 2013, at 6:46 PM, cassie jones wrote: Dear R-users, I am trying to integrate a function using

Re: [R] extract all numbers from a string

2013-06-16 Thread Gabor Grothendieck
On Sun, Jun 16, 2013 at 9:00 PM, Nick Matzke mat...@berkeley.edu wrote: Thanks *VERY* much, this is great! I realized a few more cases, I think I've got something that covers all the possibilities now: library(stringr) tmpstr = The first number is: 32. Another one is: 32.1. Here's a