[R] boot.ci
Dear boot.ers, I ran a small program for training purposes and ended with problems in boot.ci bush - c(rep(1, 840), rep(0, 660)) f.mean - function(y, id) {mean(y[id])} bushB - boot(bush, f.mean, 1000) boot.ci(bushB, conf = 0.95, type = c('perc', 'bca')) Error in bca.ci(boot.out, conf, index[1], L = L, t = t.o, t0 = t0.o, h = h, : estimated adjustment 'a' is NA What's wrong in my setup? boot appears to work OK Sincerly Fredrik Lundgren PS. By the way - anyone who has Resampling stats, standalone for sale? DS __ R-help@stat.math.ethz.ch 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] package with roc, sensitivity, specificity, kappa etc
Dear Guru's, Is there a package (R of course) with programs for diagnostics - roc, sens , spec, kappa etc? Best wishes Fredrik L __ R-help@stat.math.ethz.ch 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] R CMD INSTALL in R 2.5.1 (2007-06-27)
Hello, I'm moving from R 2.2.1 (Winows XP) to R 2.5.1 and have problems with installing myfuncs, which worked OK in 2.2.1 R CMD INSTALL myfuns # gives installing to '' -- Making package myfuncs adding build stamp to DESCRIPTION installing R files installing man source files installing indices installing help Building/Updating help pages for package 'myfuncs' Formats: text html latex example chm Bland.plottexthtmllatex example Cook.plot texthtmllatex example added.var.plottexthtmllatex example jit.plot texthtmllatex example waldtest texthtmllatex example preparing package myfuncs for lazy loading Warning in list.files(lib, pattern = paste(^, pkg_regexp, sep = ), full = TR UE) : list.files: '' is not a readable directory Error in findpack(package, lib.loc) : there is no package called 'myfuncs' Execution halted make: *** [lazyload] Error 1 *** Installation of myfuncs failed *** Removing '/myfuncs' # end installing to '' at the start appears to be the problem I have install Rtools 2.5.1 appropriately ( I hope) my PATH looks like this: PATH=C:\Program\Rtools\MinGW\bin;C:\Program\R\Rtools\bin;c:\program\imagemagick- 6.1.8-q16;C:\Program\TeXLive\bin\win32;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS \system32\WBEM;C:\Program\Aspell\bin;C:\Program\Perl\bin\;C:\Program\HTML Help W orkshop;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program\ATI T echnologies\ATI Control Panel;C:\Program\R\R-2.5.1\bin;C:\Program\sp2000\cmd;C:\ Program\XEmacs\XEmacs-21.4.13\i586-pc-win32;C:\Program\gnuplot\bin;C:\Program\Ma yura;C:\Program files\WinEdt Team\WinEdt;C:\Program\Internet Explorer;;C:\Progra m\WinBUGS;C:\Program\Adobe\Acrobat 7.0\Reader;C:\Program\QuickTime\QTSystem\ To me looks as if R don't know where to install - any help available? Sincerely Fredrik Lundgren __ R-help@stat.math.ethz.ch 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.
Re: [R] R CMD INSTALL in R 2.5.1 (2007-06-27)
Sorry, my fault! I had # install myfuncs library(myfuncs) in the RProfile.site before I had myfuncs installed # library(myfuncs) fixed everything. I could now R CMD INSTALL as before - no problems Thanks for your help Fredrik - Original Message - From: Uwe Ligges [EMAIL PROTECTED] To: Fredrik Lundgren [EMAIL PROTECTED] Cc: R-help r-help@stat.math.ethz.ch Sent: Saturday, June 30, 2007 11:03 PM Subject: Re: [R] R CMD INSTALL in R 2.5.1 (2007-06-27) Fredrik Lundgren wrote: Hello, I'm moving from R 2.2.1 (Winows XP) to R 2.5.1 and have problems with installing myfuncs, which worked OK in 2.2.1 R CMD INSTALL myfuns # gives installing to '' Have you set an environment variable such as R_LIBS that is rather than a sensible directory? (my guess) Are all the tools up to date? Do you have another library (except the standard one) defined anywhere? Can you source() all the R files in your package separately in R-2.5.1? Uwe Ligges -- Making package myfuncs adding build stamp to DESCRIPTION installing R files installing man source files installing indices installing help Building/Updating help pages for package 'myfuncs' Formats: text html latex example chm Bland.plottexthtmllatex example Cook.plot texthtmllatex example added.var.plottexthtmllatex example jit.plot texthtmllatex example waldtest texthtmllatex example preparing package myfuncs for lazy loading Warning in list.files(lib, pattern = paste(^, pkg_regexp, sep = ), full = TR UE) : list.files: '' is not a readable directory Error in findpack(package, lib.loc) : there is no package called 'myfuncs' Execution halted make: *** [lazyload] Error 1 *** Installation of myfuncs failed *** Removing '/myfuncs' # end installing to '' at the start appears to be the problem I have install Rtools 2.5.1 appropriately ( I hope) my PATH looks like this: PATH=C:\Program\Rtools\MinGW\bin;C:\Program\R\Rtools\bin;c:\program\imagemagick- 6.1.8-q16;C:\Program\TeXLive\bin\win32;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS \system32\WBEM;C:\Program\Aspell\bin;C:\Program\Perl\bin\;C:\Program\HTML Help W orkshop;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program\ATI T echnologies\ATI Control Panel;C:\Program\R\R-2.5.1\bin;C:\Program\sp2000\cmd;C:\ Program\XEmacs\XEmacs-21.4.13\i586-pc-win32;C:\Program\gnuplot\bin;C:\Program\Ma yura;C:\Program files\WinEdt Team\WinEdt;C:\Program\Internet Explorer;;C:\Progra m\WinBUGS;C:\Program\Adobe\Acrobat 7.0\Reader;C:\Program\QuickTime\QTSystem\ To me looks as if R don't know where to install - any help available? Sincerely Fredrik Lundgren __ R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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] converting help files with Sd2Rd
Dear list, I would like to convert several .d files to several .Rd files in cmd.exe (Win XP home): R CMD Sd2Rd *.d prints all files to the screen, I want the individual files saved to disk R CMD Sd2Rd *.d foo.Rd puts them into one file, I want the individual files R CMD Sd2Rd *.d *.Rd complains: Wrong syntax for file name, directory name eller volyme etiquette. R CMD Sd2Rd foo.d foo.Rd works OK How can I transform several .d files to several .Rd files with one command? Best wishes Fredrik __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] help with parsing multiple coxph() results
Hao, I'm not sure but you have specified your modell as tautology. The formula below should be enough: survtest - coxph(Surv(fup_interval, endpoint) ~ geneid, data = pcc.primary.stg.3.cox) HTH Fredrik - Original Message - From: Hao Liu [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Tuesday, January 17, 2006 7:47 PM Subject: [R] help with parsing multiple coxph() results Dear All: I have a question on using coxph for multiple genes: I have written code to loop through all 22283 genes in the Hgu-133A and apply coxph on survival data. However, I don't know how to work with the result for each gene: survtest-coxph(Surv(pcc.primary.stg.3.cox[,'fup_interval'],pcc.primary.stg. 3.cox[,'endpoint'])~pcc.primary.stg.3.cox[,'geneid'],pcc.primary.stg.3.cox) each time I tried to look at what is in survtest it gives me this: == coxph(formula = Surv(pcc.primary.stg.3.cox[, fup_interval], pcc.primary.stg.3.cox[, endpoint]) ~ pcc.primary.stg.3.cox[, 208181_at], data = pcc.primary.stg.3.cox) coef exp(coef) se(coef) z p pcc.primary.stg.3.cox[, 208181_at] -1.87 0.1540.688 -2.72 0.0065 Likelihood ratio test=8.56 on 1 df, p=0.00343 n= 48 === What I wanted to do is to use a matrix to store each survtest result, but it seems to me there is no data structure in R to store the result of coxph into a matrix. I got the following code to calculate a P value based on survtest = z-survtest$coefficients/sqrt(surv$var) p-2*(1-pnorm(abs(z))) then, what is the P value thus calculated? === The question I have are: 1. How do I access different parts of coxph result? 2. Is there a way to store multiple coxph results into a data structure that can be efficiently accessed? 3. if I find a list of genes I am interested, are there efficient to plot all of them based on the survial data? Thanks Hao Liu, Ph. D [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] edit.data.frame - summary
Thanks to David Firth Brian Ripley ronggui jim holtman who help with this question. showData() from the relimp package works and shows the dataframe as.is but scrolls rather weak with huge data.frames (15 000 x 120) fix(...) is somewhat dangerous as you usually don't want to correct individual data but get an overview invisible(edit(...)) does the trick and scrolls with excellent speed even with huge dataframes but not exactly as.is (dates as negative or positive integer, minor problem). Fredrik - Original Message - From: David Firth [EMAIL PROTECTED] To: Fredrik Lundgren [EMAIL PROTECTED] Cc: R-help r-help@stat.math.ethz.ch Sent: Friday, January 13, 2006 9:21 AM Subject: Re: [R] edit.data.frame On 12 Jan 2006, at 22:17, Fredrik Lundgren wrote: Dear list, Sometimes I have huge data.frames and the small spreadsheetlike edit.data.frame is quite handy to get an overview of the data. However, when I close the editor all data are rolled over the console window, which takes time and clutters the window. Is there a way to avoid this? An alternative to the editor is showData() from the relimp package. It is modeless, meaning that your data window can be left open/ minimized while you work in R. I haven't tested it with _very_ large data frames though. David -- Professor David Firth http://www.warwick.ac.uk/go/dfirth __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] edit.data.frame
Dear list, Sometimes I have huge data.frames and the small spreadsheetlike edit.data.frame is quite handy to get an overview of the data. However, when I close the editor all data are rolled over the console window, which takes time and clutters the window. Is there a way to avoid this? Fredrik __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Missing value representation in Excel before extraction to R with RODBC
Dear Petr, Thank you for your help. I have tried (and succeded) to import myfile after conversion to text and with the help of read.table (also with the file = 'clipboard' alternative). Both methods give correct results, albeit dateformat turns up as a factor (minor problem). Also the read.xls from library gdata has been successful, albeit with some different representation of dateformat( minor problem). At least my Excelfile isn't corrupted in such a way to make this three ways impossible. No, my problem appears to be connected to the use of RODBC and that was what I wanted to get working. The first 8 rows are excluded from the file and columns with many NA's at the start are tranformed to all NA. If the NA's at the beginning of a column are given values (i. e. not NA) the tranformation of the column doesn't take place but the first 8 rows are still excluded. I have tried - not necessarily in a correct way - to use as.is (keeps the dateformat correct) and colClasses (doesn't apply?) but haven't been able to sort the problem out with these options. Best wishes Fredrik - Original Message - From: Petr Pikal [EMAIL PROTECTED] To: Fredrik Lundgren [EMAIL PROTECTED]; R-help r-help@stat.math.ethz.ch Sent: Tuesday, January 10, 2006 10:08 AM Subject: Re: [R] Missing value representation in Excel before extraction to R with RODBC Hi I tried to reproduce what you have told us by copy and paste read.delim(clipboard) but was not successful. Even with several blank values in each column in Excel i got correct import to R by this process. As I do not use RODBC I do not know all possible settings and features. If colClasses is available you can force the columns to by character, numeric, factor, Date or some other class. BTW Excel can be quite tricky and hides e.g. spaces in cells so you see them as empty even if they are not. So if I get some weird conversions of numeric columns there is often something hidden in Excel. HTH Petr On 9 Jan 2006 at 18:06, Fredrik Lundgren wrote: From: Fredrik Lundgren [EMAIL PROTECTED] To: Prof Brian Ripley [EMAIL PROTECTED], Petr Pikal [EMAIL PROTECTED] Copies to: R-help r-help@stat.math.ethz.ch Subject:Re: [R] Missing value representation in Excel before extraction to R with RODBC Date sent: Mon, 9 Jan 2006 18:06:49 +0100 Dear list, Well, those columns in Excel that starts with NA (actually 8 NA's in my case) is imported as all NA in R but if the columns starts with at least 3 cells with values (i.e not NA) the are imported correctly to R. When as.is=TRUE is used a simular conversion takes place but now as all NA and dates are represented as date-and-time. Is there any way to get this correct even when the Excel columns start with several NA's? Sincerely Fredrik - Original Message - From: Prof Brian Ripley [EMAIL PROTECTED] To: Petr Pikal [EMAIL PROTECTED] Cc: Fredrik Lundgren [EMAIL PROTECTED]; R-help r-help@stat.math.ethz.ch Sent: Monday, January 09, 2006 9:36 AM Subject: Re: [R] Missing value representation in Excel before extraction to R with RODBC On Mon, 9 Jan 2006, Petr Pikal wrote: Hi I believe it has something to do with the column identification decision. When R decides what is in a column it uses only some values from the beginning of a file. Not R, Excel. Excel tells ODBC what the column types are. I do not use RODBC as read.delim(clipboard, ...) is usually more convenient but probably there is a way how to tell RODBC what is in the column instead of let R decide from the top of the file. Using as.is=TRUE stops RODBC doing any conversion. But I may be completely mistaken. HTH Petr On 6 Jan 2006 at 20:47, Fredrik Lundgren wrote: From: Fredrik Lundgren [EMAIL PROTECTED] To: R-help r-help@stat.math.ethz.ch Date sent: Fri, 6 Jan 2006 20:47:29 +0100 Subject:[R] Missing value representation in Excel before extraction to R with RODBC Dear list, How should missing values be expressed in Excel before extraction to R via RODBC. I'm bewildered. Sometimes the representation with NA in Excel appears to work and shows up in R as NA but sometimes the use of NA in Excel changes the whole vector to NA's. Blank or nothing or NA as representation for missing values in Excel with dateformat gives NA's of the whole vector in R but with general format in Excel gives blanks for missing values in R. How should I represent missing values in Excel? Best wishes and thanks for any help Fredrik Lundgren -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 Petr
Re: [R] Missing value representation in Excel before - solved in a way- summary
Thanks to Leif Kirschenbaum, Brian Ripley and Petr Pikal, who helped with this problem. Unfortunately it appears as if the problem with columns beginning with NAs is deeply connected to Microsoft ODBC DLL's automatic determination of column type based on the contents of the first N rows of each column and further that this behaviour can't be reliably tweaked so that RODBC can function with every file.xls. Until the Microsoft ODBC DLL is fixed I will have to use read.table from 'textfile' or 'clipboard' or Gregory Warnes read.xls in package 'gdata'. All three methods have worked OK (inspite of some minor formatting aspects of dateformats) even with this tricky file. Fredrik - Original Message - From: Leif Kirschenbaum [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Tuesday, January 10, 2006 9:50 PM Subject: Re: [R] Missing value representation in Excel before I reproduce from memory my exhaustive look into this issue. RODBC uses the Microsoft ODBC DLL's developed by Microsoft. These DLL's perform an automatic determination of column type based on the contents of the first N rows of cells in each column, where N [0,16]. N may be set in the Windows system registry, and there are a few other things that may be set in the system registry which control how the DLL parses an Excel spreadsheet. Unfortunately, the Microsoft DLL's do not always pay attention to the registry settings and do not always interpret them in the same manner. The end result is that no matter what you do with RODBC, and no matter how the authors of RODBC re-write it, some Excel spreadsheets will always be unreadable via RODBC given particular insidious combinations of data in some columns of your spreadsheet. (until such time as Microsoft fixes their DLL bugs, I mean features) I have some faint recollection that the Microsoft DLL incorrectly parses a column with non-empty rows due to some formatting issue of those particular columns, which I was unable to cure by re-formatting the source worksheet. I have had to resort to using the gdata package which runs a Perl script xls2csv.pl, which converts an Excel spreadsheet to CSV, for a few Excel spreadsheets which exhibit the particular anomalies preventing use of RODBC. Leif Kirschenbaum Senior Yield Engineer Reflectivity, Inc. (408) 737-8100 x307 [EMAIL PROTECTED] Message: 21 Date: Mon, 9 Jan 2006 18:06:49 +0100 From: Fredrik Lundgren [EMAIL PROTECTED] Subject: Re: [R] Missing value representation in Excel before extraction to R with RODBC To: Prof Brian Ripley [EMAIL PROTECTED], Petr Pikal [EMAIL PROTECTED] Cc: R-help r-help@stat.math.ethz.ch Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; format=flowed; charset=iso-8859-1; reply-type=response Dear list, Well, those columns in Excel that starts with NA (actually 8 NA's in my case) is imported as all NA in R but if the columns starts with at least 3 cells with values (i.e not NA) the are imported correctly to R. When as.is=TRUE is used a simular conversion takes place but now as all NA and dates are represented as date-and-time. Is there any way to get this correct even when the Excel columns start with several NA's? Sincerely Fredrik - Original Message - From: Prof Brian Ripley [EMAIL PROTECTED] To: Petr Pikal [EMAIL PROTECTED] Cc: Fredrik Lundgren [EMAIL PROTECTED]; R-help r-help@stat.math.ethz.ch Sent: Monday, January 09, 2006 9:36 AM Subject: Re: [R] Missing value representation in Excel before extraction to R with RODBC On Mon, 9 Jan 2006, Petr Pikal wrote: Hi I believe it has something to do with the column identification decision. When R decides what is in a column it uses only some values from the beginning of a file. Not R, Excel. Excel tells ODBC what the column types are. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Missing value representation in Excel before extraction to R with RODBC
Dear list, Well, those columns in Excel that starts with NA (actually 8 NA's in my case) is imported as all NA in R but if the columns starts with at least 3 cells with values (i.e not NA) the are imported correctly to R. When as.is=TRUE is used a simular conversion takes place but now as all NA and dates are represented as date-and-time. Is there any way to get this correct even when the Excel columns start with several NA's? Sincerely Fredrik - Original Message - From: Prof Brian Ripley [EMAIL PROTECTED] To: Petr Pikal [EMAIL PROTECTED] Cc: Fredrik Lundgren [EMAIL PROTECTED]; R-help r-help@stat.math.ethz.ch Sent: Monday, January 09, 2006 9:36 AM Subject: Re: [R] Missing value representation in Excel before extraction to R with RODBC On Mon, 9 Jan 2006, Petr Pikal wrote: Hi I believe it has something to do with the column identification decision. When R decides what is in a column it uses only some values from the beginning of a file. Not R, Excel. Excel tells ODBC what the column types are. I do not use RODBC as read.delim(clipboard, ...) is usually more convenient but probably there is a way how to tell RODBC what is in the column instead of let R decide from the top of the file. Using as.is=TRUE stops RODBC doing any conversion. But I may be completely mistaken. HTH Petr On 6 Jan 2006 at 20:47, Fredrik Lundgren wrote: From: Fredrik Lundgren [EMAIL PROTECTED] To: R-help r-help@stat.math.ethz.ch Date sent: Fri, 6 Jan 2006 20:47:29 +0100 Subject:[R] Missing value representation in Excel before extraction to R with RODBC Dear list, How should missing values be expressed in Excel before extraction to R via RODBC. I'm bewildered. Sometimes the representation with NA in Excel appears to work and shows up in R as NA but sometimes the use of NA in Excel changes the whole vector to NA's. Blank or nothing or NA as representation for missing values in Excel with dateformat gives NA's of the whole vector in R but with general format in Excel gives blanks for missing values in R. How should I represent missing values in Excel? Best wishes and thanks for any help Fredrik Lundgren -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Solved - gnuclient problems witrh R/ESS in linux
Finally, I found a way to make fix() and edit() work with gnuclient in ESS-5.2.6/R-2.0.1/Xemacs-21.4.15-r3 on gentoo-linux. When invoking R/ESS the following is induced by ESS options(STERM='iESS', editor='gnuclient -q') It appears as if the problem is with 'gnuclient -q' (whatever does -q signify?? From the man page it appears to disconnect the association between the opened buffer and gnuclient - which was teh very problem) and when i changed a row in ess-5.2.6/lisp/gnu-cust.el things worked in the expected way. Change row if (featurep 'xemacs) gnuclient -q emacsclient))) ;; unix to if (featurep 'xemacs) gnuclient emacsclient))) ;; unix and all things work OK. The only thing needed in init.el for gnuclient to work in this setup is (gnuserv-start) and possibly (setq gnuserv-frame (selected-frame)) if you whant the gnuclient frame to open within Xemacs and no fuss with PATH Many thanks to Richard M. Heiberger for all help! Fredrik PS A peculiar thing though - In the latest manual for ESS it's said: 4.9 Using emacsclient When starting R or S under Unix, ESS sets options(editor=emacsclient). (Under Microsoft Windows, it will use gnuclient.exe rather than emacsclient, but the same principle applies.) but I got options(editor=gnuclient -q) now changed to options(editor=gnuclient ) DS - Original Message - From: Fredrik Lundgren [EMAIL PROTECTED] To: R-help r-help@stat.math.ethz.ch Sent: Monday, March 28, 2005 7:37 PM Subject: [R] gnuclient problems witrh R/ESS in linux Dear list, Not strictly R ... In R on Xemacs with ESS (R-2.0.1, Xemacs-21.4.15-r3, ESS-5.2.6) on gentoo-linux when I use k-edit(k) or fix(k) to change a small vector k - c(1,2,3,4,5,6) the opened window (called '6b8b4567') appears not to be connected to the gnuclient and I'm able to edit the file but has no instructions in the minibuffer and C-x # gives '6b8b4567 does not belong to gnuserv client' in init.el I have (require 'gnuserv) (gnuserv-start) (setq gnuserv-frame (selected-frame)) Any help please? Fredrik __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] gnuclient problems witrh R/ESS in linux
Dear list, Not strictly R ... In R on Xemacs with ESS (R-2.0.1, Xemacs-21.4.15-r3, ESS-5.2.6) on gentoo-linux when I use k-edit(k) or fix(k) to change a small vector k - c(1,2,3,4,5,6) the opened window (called '6b8b4567') appears not to be connected to the gnuclient and I'm able to edit the file but has no instructions in the minibuffer and C-x # gives '6b8b4567 does not belong to gnuserv client' in init.el I have (require 'gnuserv) (gnuserv-start) (setq gnuserv-frame (selected-frame)) Any help please? Fredrik __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] RMySQL for R 2.0.1
Dear List, RMySQL is old and wouldn't install on R 2.0.1. How should the source be rewritten to be accepted by R 2.0.1. With thanks Fredrik Lundgren __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Slow R Graphics: Device 2 within Xemacs/Ess
Dear R-list, I use Xemacs 21.4.13 with Ess, R 2.0.1, and Win XP. When i plot something it shows up OK in the graphics window but when I want to change between windows in the foreground (between Xemacs and R Graphics: Device) the graphics window is awfully slow to redraw when forced to the foreground. When I use Rgui this is not any problem at all so it appears to be something wrong between Xemacs and R. (Ess and R work very well in Xemacs from other aspects) Any hints how to tweak the programs to each other? Best wishes Fredrik Lundgren __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] translate nroff .d or .sgml files to .rd files
Dear list, I have some help file for S-Plus 2000 in .d and .sgml format. Is there a way to translate these files to .Rd files to use in an R package? Thanks Fredrik Lundgren __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] translate nroff .d or .sgml files to .rd files
Thanks, works OK for Win XP and R 2.0.1 with R CMD Sd2Rd *.d *.Rd Fredrik - Original Message - From: Peter Dalgaard [EMAIL PROTECTED] To: Fredrik Lundgren [EMAIL PROTECTED] Cc: R-help r-help@stat.math.ethz.ch Sent: Saturday, January 08, 2005 9:22 PM Subject: Re: [R] translate nroff .d or .sgml files to .rd files Fredrik Lundgren [EMAIL PROTECTED] writes: Dear list, I have some help file for S-Plus 2000 in .d and .sgml format. Is there a way to translate these files to .Rd files to use in an R package? Thanks Fredrik Lundgren That's what R CMD Sd2Rd is for. Not sure how/if it works on Windows, though. It's a Perl script, so presumably you need Perl... -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Inspecting R functions
Richard, There are usually several methods available - depending on the class of the object you apply 'hist' on. In this case two are 'non-visible' ## methods(hist) [1] hist.Date* hist.default hist.POSIXt* Non-visible functions are asterisked ## Probably you are interested in hist.default ## hist.default function (x, breaks = Sturges, freq = NULL, probability = !freq, include.lowest = TRUE, right = TRUE, density = NULL, angle = 45, col = NULL, border = NULL, main = paste ... snip ... } else r } environment: namespace:graphics ## Fredrik Lundgren - Original Message - From: Richard Dybowski [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Monday, January 03, 2005 11:50 AM Subject: [R] Inspecting R functions In S-Plus, I can look at the structure of a function (for example, hist) simply by entering hist RETURN however, if I do this in R, I get the response function (x, ...) UseMethod(hist) environment: namespace:graphics How can I inspect the structure of a function in R? --- Richard Dybowski 143 Village Way Pinner HA5 5AA, UK Tel: 07976 250092 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] editing a package directly from R
Dear R, I have made a package 'myfuncs' of some home made functions and installed it without problems. It contains no C or fortran code and no dynamic link library. Is there a way to edit this package directly from R (or Xemacs with ESS) or do I always have to edit the source and then reinstall the package? I have a weak memory that such editing could be done in S-Plus 2000 or 6.1? Windows XP, R 2.0.1, Xemacs 21.4.13, and ESS 5.2.2 Thanks for any help Fredrik Lundgren __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R]
test - please disregard Fredrik Lundgren __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] random effect in logistisk regression
Dear R-gurus, Where can I find a simple logistic regression model which can handle random effects as well among all the R-packages? With thansk in advance Fredrik Lundgren Norrköping, Sweden __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] bootstrap package
Hello R'ers In previous versions of R (I now use 2.0.1) there was a package bootstrap. I wrote some programs that depended heavily on this package but can unfortunately not find it on Cran today. Is there any way to find an older version of bootstrap and use it with the new version - 2.0.1? Sincerely Fredrik Lundgren Norrköping Sweden __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] estimation of lambda and gamma with std errors for a weibull model
Dear R experts, How should lambda and gamma (with std.errors) be calculated for a weibull model with age as an independent predictor? I have assumed that this can be done with survreg with e. g. (summary(survreg(Surv(time, status) ~ age, dist = 'weibull')) ) and predict.survreg with e.g. (predict(model, se.fit = T, newdata = data.frame(age = seq(50, 80, 5)) but unfortunately I'm uncapable to sort out how to get the lambda and gamma values (with std.errors). I haven't found any example of this in the help pages and would really appreciate any help! With best wishes and thanks in advance for any help Fredrik Lundgren __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] force fixed format
Hello, A small problem I can't solve p - 0.0001 p [1] 1e-04 How can I force the printout of p to 0.0001? I have tried 'format', 'round', 'signif', 'print' in different combinations without success. Fredrik Lundgren __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] unary operations
Hello, I had expected that the following should work mat - matrix(c(5, 7, 6, 7, 8, 10, 17, 28, 36, 41, 46, 140), nrow = 2, byrow = T) mat apply(mat, 2, function(e1,e2) e1*e2) apply(mat, 2, function(e1,e2) e1+e2) apply(mat, 2, function(e1,e2) e1-e2) apply(mat, 2, function(e1,e2) e1/e2) but I get Error in FUN(newX[, i], ...) : Argument e2 is missing, with no default What do I do wrong? Sincerely Fredrik Lundgren __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R]plot.survfit
Hello, How do I get plot.survfit to draw a survival curve with prespecified time periods, say 1 month, 2, months, 3 months, 6 months, 1 year, 2 years etc) instead of the individual times of all events? Sincerely Fredrik Lundgren __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R]??devga??
To R-help, I recently installed R Version 1.8.1 (2003-11-21), ISBN 3-900051-00-3 and use Win 98SE When I plot I get the following result ### plot(1:10, 1:10) Error in windows() : 10 arguments passed to devga which requires 13. ### What should I do to devga? Sincerely Fredrik Lundgren __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] slides in linux R
Hello, In S-Plus Windows you can transform graphics to Powerpoint very easily, in R Windows you can use enhanced metafiles (.emf) and Powerpoint almost as easy. Is there a simular way with R in Linux to transform to the presentation program in StarOffice or OpenOffice or are you stuck with the pdf device? Fredrik Lundgren __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] summary(font problems in X11 with linux R)
Marvellous! Thanks to Marc Swartz and Peter Dalgaard the font problems in X11 with linux R was solved. I added /usr/X11R6/lib/X11/fonts/75dpi /usr/X11R6/lib/X11/fonts/100dpi to /etc/X11/fs/config but nothing happened until I in addition installed 100dpi fonts from the SUSE dvd and then alas - no more font problems with 'pairs', 'scatterplot.matrix' etc but still the window with message: Warning: Cannot convert string -*-helvetica-*-*-*-*-*-*-12-*-*-*-iso8859-1to type FontsStruct comes up with help.start() on Netscape. However, I think this is a little unfair of SuSE. Well, thanks again a lot Fredrik måndagen den 31 mars 2003 16.06 skrev Peter Dalgaard BSA: Marc Schwartz [EMAIL PROTECTED] writes: surfaced. When I use pairs in John Fox's car library e.g.: pairs(cbind(prestige, income, education, women)) Error in text.default(x, y, txt, cex = cex, font = font) : X11 font at size 16 could not be loaded In addition: Warning message: freeing previous text buffer in GText Evidently there is some problem with my fonts or their loading in X11. However, I can add text to a plot up to size 24 but not larger - Warning message: X11 used font size 24 when 30 was requested In addition - when i use help.start() within R and choses Search Engine Keywords a window pops up with the following text in the windowbar: Netscape:subprocess diagnostics(stdout/stderr) and the following message: Warning: Cannot convert string -*-helvetica-*-*-*-*-*-*-12-*-*-*-iso8859-1to type FontsStruct but otherwise help.start with Netscape works OK. No other problems with fonts have surfaced - for example I can use font size 16 in StarOffice 6.0 and Xemacs 21.4 without problems. I realize that this is more a Linux or X11 than a R question but actually I don't know where to turn. I use SuSE linux 8.1, R 1.62, and Netscape 4.8. How do I fix this problem? Sincerely Fredrik Lundgren It sounds like you might not have scaled versions of your fonts loaded in /etc/X11/fs/config Take a look in there for the following lines, depending upon whether you have 75 or 100 dpi fonts loaded: /usr/X11R6/lib/X11/fonts/75dpi:unscaled /usr/X11R6/lib/X11/fonts/100dpi:unscaled See if there are also the following lines: /usr/X11R6/lib/X11/fonts/75dpi /usr/X11R6/lib/X11/fonts/100dpi If one of the second set of lines are not present to correspond with one of the first two lines, it is likely that scaled versions of your fonts are not being loaded by the font server. I think that on SuSE you want *both* the 75dpi and 100dpi fontsets installed. The internal code assumes that either you have the full set of unscaled fonts or have scalable fonts (this is arguably a bug, but I'm not sure I dare touch that particular piece of code at this point), and SuSE gives you only one of the unscaled ones bye default. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] font problems in X11 with linux R
Hello, I'm inexperienced with linux, X11 and R. A font problem have surfaced. When I use pairs in John Fox's car library e.g.: pairs(cbind(prestige, income, education, women)) Error in text.default(x, y, txt, cex = cex, font = font) : X11 font at size 16 could not be loaded In addition: Warning message: freeing previous text buffer in GText Evidently there is some problem with my fonts or their loading in X11. However, I can add text to a plot up to size 24 but not larger - Warning message: X11 used font size 24 when 30 was requested In addition - when i use help.start() within R and choses Search Engine Keywords a window pops up with the following text in the windowbar: Netscape:subprocess diagnostics(stdout/stderr) and the following message: Warning: Cannot convert string -*-helvetica-*-*-*-*-*-*-12-*-*-*-iso8859-1to type FontsStruct but otherwise help.start with Netscape works OK. No other problems with fonts have surfaced - for example I can use font size 16 in StarOffice 6.0 and Xemacs 21.4 without problems. I realize that this is more a Linux or X11 than a R question but actually I don't know where to turn. I use SuSE linux 8.1, R 1.62, and Netscape 4.8. How do I fix this problem? Sincerely Fredrik Lundgren __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] ordered dotplot
Hello, I'm using linux R 1.6.2 and have a named vector (double) which I want too plot with lattice and dotplot. I want both names and values ordered by the vector. In S-Plus this was easy in R I fail. Sincerely Fredrik Lundgren __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Help.start, .Renviron , and .Rprofile
Hello experienced R-ers, I'm converting from S-Plus Win 98SE to SuSE 8.1, R 1.62 and have run into som problems. 1) When I use help.start() netscape comes up OK and all links are accessible except Search Engine Keywords : search doesn't work and the keywords from base doesn't respond either. ?command within R gets netscape running and works OK. 2) I haven't been able to get Renviron.site, Rprofile.site, .Renviron, and .Rprofile to work and affect my sessions. To the best of my knowledge I have handled these files according to Invoking R under Unix in Rintro. .First within R works OK and this is the way I customize R at the present time. Hopefully someone out there realizes what I'm doing wrong. Thanks in advance Sincerely Fredrik Lundgren __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] .Rprofile problems
Hello, I'm using _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major1 minor6.1 year 2002 month11 day 01 language R and can't get a .Rprofile file into my workspaces. The system doesn't accept the name .Rprofile How do I get such a file into my workspaces? Sincerly F Lundgren Norrköping Sweden [[alternate HTML version deleted]] __ [EMAIL PROTECTED] mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help