Re: [R] Function in R saving in xls

2013-06-23 Thread David Winsemius
On Jun 23, 2013, at 1:54 PM, Sérgio Henrique almeida da silva ju wrote: > I created a program that breaks a database in several other banks. But in > this program I save this several banks in txt so now I'd like save in xls, > but I don't know how. > > I tried for (nm in Nms) write.table(Res[[nm

Re: [R] Function in R saving in xls

2013-06-23 Thread Rui Barradas
Hello, To work with xls files, check out package XLConnect. The vignette explains how to use it rather well. Also, don't use attach() It can be confusing and a source for errors. Hope this helps, Rui Barradas Em 23-06-2013 21:54, Sérgio Henrique almeida da silva ju escreveu: I created a pr

Re: [R] function in R for my exercise

2012-01-04 Thread Thomthom
Hi Michael, Thanks for your answer! sorry I didn't see this rule... No problem, I'll try to figure it out by myself. Thanks for your indication though! Thomas 2012/1/4, Michael Weylandt [via R] : > > > Unfortunately, there's a general no-homework rule because we never > know what your instructo

Re: [R] function in R for my exercise

2012-01-04 Thread R. Michael Weylandt
Unfortunately, there's a general no-homework rule because we never know what your instructor wants you to figure out on your own (though, a sincere thanks for admitting this was hw rather than trying to trick us like so many). That said, I think your second function, while a little clumsy, does wor

Re: [R] Function in R for computing correlation matrix and covariancematrix

2009-06-03 Thread Bert Gunter
?ar ?arima help.search("autoregressive") Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of FMH Sent: Wednesday, June 03, 2009 12:31 PM To: r-help@r-project.org Subject: [R] Function in

Re: [R] function in R

2008-10-02 Thread hadley wickham
On Thu, Oct 2, 2008 at 6:34 AM, Alphonse Monkamg <[EMAIL PROTECTED]> wrote: > > > > > Dear ALL, > > Does anyone know how to get the complete code program for any build-in > function > in R, e.g. when I tape mean in the R-console, I get the following: > > mean > > function (x, ...) > > UseMethod("

Re: [R] function in R

2008-10-02 Thread Gustaf Rydevik
On Thu, Oct 2, 2008 at 1:34 PM, Alphonse Monkamg <[EMAIL PROTECTED]> wrote: > > > > > Dear ALL, > > Does anyone know how to get the complete code program for any build-in > function > in R, e.g. when I tape mean in the R-console, I get the following: > > mean > > function (x, ...) > > UseMethod("

Re: [R] function in R

2008-10-02 Thread bartjoosen
you can see the different methods of mean by: methods(mean) Then you can type mean.default and you will see the complete code. Bart Alphonse Monkamg wrote: > > > > > > Dear ALL, > > Does anyone know how to get the complete code program for any build-in > function > in R, e.g. when I tape

Re: [R] function in R that's equivalent to SQL's "IN"

2007-10-26 Thread Gabor Grothendieck
Here are a few ways: with(z, y[x %in% w]) subset(z, x %in% w)$y z[z$x %in% w, "y"] z$y[z$x %in% w] # see sqldf.googlecode.com for more info library(sqldf) sqldf("select y from z where x in (2, 3, 5)") # but if you know that x is 1:n and the components of w are in # that s

Re: [R] function in R that's equivalent to SQL's "IN"

2007-10-26 Thread Benilton Carvalho
z$y[z$x %in% w] b On Oct 26, 2007, at 4:19 PM, Em C wrote: > Hi all, > > I'm trying to find > something like the "==" operator that will work on vectors or > something > equivalent to SQL's "IN" function. For e.g., if I have: > > x <- c(1,2,3,4,5) > y <- c("apples", "oranges", "grapes", "banan