Re: [R] Modifying glm.fit() / execution path

2010-07-31 Thread Prof Brian Ripley
On Sun, 1 Aug 2010, Benjamin Ridenhour wrote: Hello all, I'm sure I'm missing something simple here, but I can't figure out how to modify the glm.fit() function and then get R to use it (sort of). I'm doing something along the lines of: glm.fit<-edit(glm.fit) # add something trivial to the top

[R] Modifying glm.fit() / execution path

2010-07-31 Thread Benjamin Ridenhour
Hello all, I'm sure I'm missing something simple here, but I can't figure out how to modify the glm.fit() function and then get R to use it (sort of). I'm doing something along the lines of: glm.fit<-edit(glm.fit) # add something trivial to the top of the glm.fit function like: print("Hello world!

Re: [R] remove extreme values or winsorize – loop - dataframe

2010-07-31 Thread jim holtman
This will split the data by industry & year and then return the values that include the 80%-tile (>=10% & <= 90%) # split the data by industry/year d.s <- split(data, list(data$industry, data$year), drop=TRUE) result <- lapply(d.s, function(.id){ # get 10/90% values .limit <- quantile(.id$

[R] remove extreme values or winsorize – loop - dataframe

2010-07-31 Thread Cecilia Carmo
Hi everyone! #I need a loop or a function that creates a X2 variable that is X1 without the extreme values (or X1 winsorized) by industry and year. #My reproducible example: firm<-sort(rep(1:1000,10),decreasing=F) year<-rep(1998:2007,1000) industry<-rep(c(rep(1,10),rep(2,10),rep(3,10),rep(4,1

Re: [R] multiple graphics windows open

2010-07-31 Thread Tal Galili
Hi Erin, Actually your original code does create 3 distinct graphs. (At least for me on Win XP). If you are using a different OS, you might want to try something like x11() instead. Tal Contact Details:--- Contact me: tal.gal.

Re: [R] multiple graphics windows open

2010-07-31 Thread Erin Hodgess
This will work. I was hoping for 3 "distinct" graphs so the user would be able to click on them. Thanks, Erin On Fri, Jul 30, 2010 at 11:07 PM, Tal Galili wrote: > Hello Erin. > I think I understand. > Those the following code solve your issue ? > > # >

[R] How to connect R with SAP

2010-07-31 Thread Andre
Hello, Anyone knows if there is a way to connect R with the ERP SAP? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/How-to-connect-R-with-SAP-tp2309018p2309018.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] vector creation

2010-07-31 Thread David Winsemius
On Jul 31, 2010, at 10:21 AM, Berend Hasselman wrote: On 31-07-2010, at 16:12, alekk [via R] wrote: sorry for being unclear: my function func() is actually more complicated than that, and uses random numbers to generate its result. If I run something like vect = rep(func(), N) I will

Re: [R] Having problem to define a subclass, please help me

2010-07-31 Thread Megh
Still no reply on my query. Is it not understandable? Can I reformulate better my question? Thanks, -- View this message in context: http://r.789695.n4.nabble.com/Having-problem-to-define-a-subclass-please-help-me-tp2308170p230.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] vector creation

2010-07-31 Thread alekk
sorry for being unclear: my function func() is actually more complicated than that, and uses random numbers to generate its result. If I run something like vect = rep(func(), N) I will get something like (x,x,x, ... ,x). What is the right way to do that ? Thanks! -- View this message in

[R] vector creation

2010-07-31 Thread alekk
dear all, consider a simple function like func = function(){ return(runif()) } and say that you would like to create a vector of size N, each entry being a call to this function "func". What is the equivalent of the python code vect = [ func() for i in range(N)] Indeed, you cannot jus

[R] Converting expressions to functions

2010-07-31 Thread Prof. John C Nash
Dear R colleagues, I'm looking for some examples or vignettes or similar to suggest good ways to convert an expression to a function. In particular, I'd like to (semi-) automate the conversion of nls() expressions to residual functions. Example Given variables y, T and parameters b1, b2, b3 i

Re: [R] I have a problem

2010-07-31 Thread David Winsemius
On Jul 31, 2010, at 10:26 AM, 笑啸 wrote: dear£ºDavid Winsemius in the example£¨nomogram£©£¬I don't understand the meanings of the program which have been marked by comment line.And how to compile the program. R is an interpreted language. There is no compilation. You submit these l

[R] I have a problem

2010-07-31 Thread 笑啸
dear£ºDavid Winsemius in the example£¨nomogram£©£¬I don't understand the meanings of the program which have been marked by comment line.And how to compile the program.(L <- .4*(sex=='male') + .045*(age-50) +(log(cholesterol - 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))). example(nom

[R] I have a problem

2010-07-31 Thread 笑啸
dear£ºDavid Winsemius in the example£¨nomogram£©£¬I don't understand the meanings of the program which have been marked by red line.And how to compile the program.(L <- .4*(sex=='male') + .045*(age-50) +(log(cholesterol - 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))). n <- 1000 # de

Re: [R] vector creation

2010-07-31 Thread Berend Hasselman
On 31-07-2010, at 16:12, alekk [via R] wrote: > sorry for being unclear: > my function func() is actually more complicated than that, and uses random > numbers to generate its result. If I run something like > vect = rep(func(), N) > I will get something like (x,x,x, ... ,x). > > Wha

Re: [R] vector creation

2010-07-31 Thread Berend Hasselman
alekk wrote: > > consider a simple function like > func = function(){ return(runif()) } > and say that you would like to create a vector of size N, each entry being > a call to this function "func". What is the equivalent of the python code > vect = [ func() for i in range(N)] > Inde

Re: [R] Is profile.mle flexible enough?

2010-07-31 Thread Ben Bolker
Arnaud Le Rouzic legs.cnrs-gif.fr> writes: > > Hi the list, > > I am experiencing several issues with profile.mle (and consequently with > confint.mle) (stat4 version 2.9.2), and I have to spend a lot of time to > find workarounds to what looks like interface bugs. I would be glad to > get f

Re: [R] simple table/matrix problem

2010-07-31 Thread Xu Wang
Hadley Wickham's reshape package makes tasks like these pretty easy. http://cran.r-project.org/web/packages/reshape/index.html -- View this message in context: http://r.789695.n4.nabble.com/simple-table-matrix-problem-tp2307969p2308713.html Sent from the R help mailing list archive at Nabble.co

Re: [R] I have a problem

2010-07-31 Thread David Winsemius
On Jul 31, 2010, at 6:29 AM, 笑啸 wrote: dear£º in the example£¨nomogram£©£¬I don't understand the meanings of the program which have been marked by red line. This is a plain text mailing list, hence no red line ... in fact no line at all. Use some other device such also outlining with

Re: [R] Formatting datetime data for gantt.chart.

2010-07-31 Thread Jim Lemon
On 07/31/2010 03:12 AM, Andrew Noyes wrote: Overall goal: I'd like to have a visual representation of when certain computer applications are running over the course of a day (data will come from a SQL query later, but I'm using a csv for now). My idea is to use a gantt chart, but I'm running

Re: [R] Need to read an Excel File

2010-07-31 Thread Hans-Peter Suter
2010/7/30 rajibshibly : > > I am trying to read an Excel file using the following: > a<-read.xls("mydata.xls", sheet=1) [snip] > Error in findPerl(verbose = verbose) : >  perl executable not found. Use perl= argument to specify the correct path. > Error in file.exists(tfn) : invalid 'file' argument

Re: [R] reading dates in Excel into R

2010-07-31 Thread Hans-Peter Suter
2010/7/30 Dimitri Liakhovitski : > I've wasted a lot of time trying to read in dates from Excel. Even > importing .csv files has not guarantees and often produces garbage > instead of dates. > What I found works best is saving the Excel data base as a > tab-delimited file .txt (after having formatt

[R] Is profile.mle flexible enough?

2010-07-31 Thread Arnaud Le Rouzic
Hi the list, I am experiencing several issues with profile.mle (and consequently with confint.mle) (stat4 version 2.9.2), and I have to spend a lot of time to find workarounds to what looks like interface bugs. I would be glad to get feedback from experienced users to know if I am really askin

[R] I have a problem

2010-07-31 Thread 笑啸
dear£º in the example£¨nomogram£©£¬I don't understand the meanings of the program which have been marked by red line.And how to compile the program(L <- .4*(sex=='male') + .045*(age-50) + (log(cholesterol - 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))). n <- 1000 # define sample size s

Re: [R] creation package

2010-07-31 Thread Uwe Ligges
On 30.07.2010 15:44, anderson nuel wrote: Dear r-help, I create a package. When I installed this package (I use this command : R CMD check namepackage),I find an error: * checking whether package 'namepackage' can be installed ... ERROR Installation failed. > Could you help me to find soluti

Re: [R] Fw: Re: R statical-script for analysis (India)

2010-07-31 Thread Uwe Ligges
We do not see your attachments since they are stripped from messages to this list. We do not have any reproducible or starting R code, we do not have the data... So PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, rep

Re: [R] Excel import; was: a problem

2010-07-31 Thread Uwe Ligges
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html which suggests to use sensible subject lines. Please read the manual R Data Import/Export which contains remarks about Excel. Best, Uwe Ligges On 31.07.2010 06:08, wrote: dear: when I read a Excel file(e

Re: [R] a problem

2010-07-31 Thread Uwe Ligges
On 31.07.2010 07:17, Wu Gong wrote: The function write.foreign is used to export data to other statistical software. To read data from Excel, R has : library(foreign) read.xport("name.xpt") No, since it is intended to read SAS XPORT files... Please also quote the original question, otherwi

Re: [R] svydesign syntax and deviance!

2010-07-31 Thread aline uwimana
Thank you Thomas, if i understand what you say below i need to use glm in order to have the deviance and consider it for the model with svyglm and choose the best model. I use glm and svyglm for two models but don't have deviance for the svyglm. As i need to choose with the two models it is corre