Re: [Rd] persp command
On 7/16/2018 7:28 AM, Christian Rau wrote: Dear R-devel mailing list, I am wondering whether the "theta" and "phi" parameters of the "persp" function in the graphics commands are named in error (the names seem to have been swapped). Not that it is authoritative, but one gleans from wikipedia, https://en.wikipedia.org/wiki/Spherical_coordinate_system , that phyicists and mathematicians have exactly opposite conventions for the meaning of theta and phi . In the end, a symbol is just a standin for what it "stands for" so, we just need to follow the persp convention when using persp. :-) Also, in the documentation to "persp", reference is made to "colatitude" when the effect in the image is actually that of "latitude". Thank you, Sincerely, Christian [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- -- Robert W. Baer, Ph.D. Professor of Physiology Kirksville College of Osteopathic Medicine A T Still University of Health Sciences 800 W. Jefferson St Kirksville, MO 63501 660-626-2321 Department 660-626-2965 FAX __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Suggestion: barplot function
On 1/27/2017 8:30 AM, danielren...@lycos.com wrote: Hello developers folks! First, congratulations for the wonderful work with R. For science, barplots with error bars are very important. We were wondering that is so easy to use the boxplot function: boxplot(Spores~treatment, col=treatment_colors) But there is no such function for barplots with standard deviation or standard error. It becomes a "journey" to plot a simple graph (e.g. https://www.r-bloggers.com/building-barplots-with-error-bars/). The same way that is easy to use the boxplot function, do you think it is possible to upgrade the barplot function: i.e.: barplot(Spores~treatment, error.bar=standard_error, col=treatment_colors) Marc may not speak for R Core, but he certainly has summarized what has been an apparent consensus attitude to barplot() and confidence bars in this community over the last decade. Further, he is probably right about no changes after this many years. I might mention that if you want a close cousin to barplot() that does what you want with base graphics (from the drawing mechanics point of view) see the barplot2() function in the gplots package. You provide your own bar lengths. Regardless of their merits, barplots are a common graphing mechanism used by my scientific colleagues to convey their data, and I don't see that changing any time soon. The one thing that is even less forgivable than dynamite plots is bars with no dispersion indication at all. Too bad barplot2() isn't the default. Thank you so much! Daniel, FU-Berlin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- -- Robert W. Baer, Ph.D. Professor of Physiology Kirksville College of Osteopathic Medicine A T Still University of Health Sciences 800 W. Jefferson St Kirksville, MO 63501 660-626-2321 Department 660-626-2965 FAX __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Possible issue with R-tools on Windows
This is a bit of a cross-post but I've encountered what appears to be a parsing error with RTools on Windows in a couple of different contexts on Widows when R is installed on a secondary drive to avoid using precious space on my c:/ solid state drive. This type of apparent parsing error has has occurred several times previously when install source code from GitHub, and most recently when installing Bioconductor code. It occurred that this list might have input directed at RTools on Windows, if this is indeed my problem Here's the full example of my most recent encounter posted to bioconductor: https://support.bioconductor.org/p/93731/ In brief the parsing seems to break in the space in the path name: The downloaded source packages are in ‘C:\Users\Rob Baer\AppData\Local\Temp\RtmpagJM0a\downloaded_packages’ Warning messages: 1: running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "C:\Users\Rob Baer\R\win-library\3.3" C:\Users\ROBBAE~1\AppData\Local\Temp\RtmpagJM0a/downloaded_packages/GO.db_3.4.0.tar.gz' had status 1 2: In install.packages(update[instlib == l, "Package"], l, repos = repos, : installation of package ‘GO.db’ had non-zero exit status Is there something going on with my RTools installation I should upgrade? My apologies if this is too off-topic for this list. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Possible issue with R-tools on Windows - Amend subject to RTerm issue
Because my response is a little long and summarizes original thread is at bottom. Okay, I tried to implement your test (and the package is installed). My discovery is that it was RTerm and not RTools giving me a problem. Summary: RTerm starts fine if installed on C: even if there is a space in the path. RTerm starts fine on E: drive if there is no space in the path, but fails to start if there is a space in the path. Because of the R versions I happened to have, this was checked using a combination of R-3.3.1, R-3.3.2, and R-3.3.3. I know for surethat RTerm for R-3.3.2 and R-3.3.3 fails to start from the command prompt in E:/prgram Files/R/R-3.3.x/bin suggesting that R-dev should be tested. For completeness here is what happened in a couple of circumstances: Windows 10 I tried starting RTerm for various R versions in the following install locations: C:/program files/R/R-3.3.1/bin - Works E:/Program Files/R/R-3.3.3/bin - Fails E:/Program/R/R-3.3.3/bin/ - Works C:/Program Files/R/R-3.3.1/bin - Works Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. = RTerm will start (at least an older version) in a path containing spaces ... R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > q() Save workspace image? [y/n/c]: n Current RTerm won't start if on E: dirve in a path containing spaces ... C:\Program Files\R\R-3.3.1\bin>e: E:\Program Files\R\R-3.3.3\bin>R 'E:\Program' is not recognized as an internal or external command, operable program or batch file. E:\Program Files\R\R-3.3.3\bin>dir Volume in drive E is Baer_HardDrive Volume Serial Number is F890-9E98 Directory of E:\Program Files\R\R-3.3.3\bin 03/11/2017 10:57 AM . 03/11/2017 10:57 AM .. 03/06/2017 04:00 PM 9,712 config.sh 03/11/2017 10:57 AM i386 03/06/2017 04:07 PM88,576 R.exe 03/06/2017 04:07 PM88,576 Rscript.exe 03/11/2017 10:57 AM x64 3 File(s)186,864 bytes 4 Dir(s) 262,685,499,392 bytes free E:\Program Files\R\R-3.3.3\bin> = And finally current RTerm works on C: in a path with spaces ... c:\Program Files\R\R-3.3.3\bin>R R version 3.3.3 (2017-03-06) -- "Another Canoe" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. On 3/12/2017 6:02 AM, Uwe Ligges wrote: Hmmm, you may know winbuilder: It has R not installed oin drive C: and works well. Even with R installed on a network share I can easily install packages. using R-devel binary in, e.g. for 64 bit: in d:/RCompile/recent/R/bin/x64 working directory: d:/library-devel specified library: c:/tmp > install.packages("GO.db", lib="c:/tmp") installing the source package ‘GO.db’ trying URL 'https://bioconductor.org/packages/3.5/data/annotation/src/contrib/GO.db_3.4.0.tar.gz' Content type 'application/x-gzip' length 31897756 bytes (30.4 MB) downloaded 30.4 MB * installing *source* package 'GO.db' ... ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded *** arch - i386 *** arch - x64 * DONE (GO.db) The downloaded source packages are in ‘d:\temp\RtmpKaYI2t\downloa
Re: [Rd] strange behaviour read.table and clipboard
You said, "put a name in the cell". Does that mean you forgot a header = TRUE? On 8/16/2017 1:25 AM, PIKAL Petr wrote: Hi Duncan The simples spreadsheet is: Put a name in the cell, let say "a1" Put number e.g. 1 below "a1" Copy the number to enough rows Select this column and press ctrl-c result is temp<- read.delim("clipboard") str(temp) 'data.frame': 1513 obs. of 1 variable: $ a1: Factor w/ 2 levels "1","a1": 1 1 1 1 1 1 1 1 1 1 ... which(temp$a1=="a1") [1] 1365 I tested it in vanilla R sessionInfo() R Under development (unstable) (2017-07-31 r73003) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 14393) Matrix products: default locale: [1] LC_COLLATE=Czech_Czech Republic.1250 LC_CTYPE=Czech_Czech Republic.1250 [3] LC_MONETARY=Czech_Czech Republic.1250 LC_NUMERIC=C [5] LC_TIME=Czech_Czech Republic.1250 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.5.0 Excel 16 or 15 I am not sure. R-devel 2015 (69443) works as expected so it started a believe around May or June this year, when I installed new R version. I hope it could help to trace the problem. If I can help any further, let me know. Best regards Petr -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Wednesday, August 16, 2017 12:35 AM To: PIKAL Petr ; r-devel@r-project.org Subject: Re: [Rd] strange behaviour read.table and clipboard On 15/08/2017 10:03 AM, PIKAL Petr wrote: Dear all I used to transfer data from excel to R by simple ctrl-c and read.delim("clipboard") construction. I know it is a bad practice but it is easy and for quick exploratory work it is OK. However after changing to new R devel few days ago I encountered weird behaviour. I tried one or two columns. You haven't posted something that is reproducible. I don't have Excel, but I can cut and paste from Libreoffice, and I don't see this. However, it's not the same spreadsheet as you used, so I wouldn't be comfortable saying I did what you did. Please reduce the size of your spreadsheet if you can, and then post instructions for how to construct it, and what to cut and paste from it. Then others can try what you did and see if this is specific to your machine, to that particular version of R-devel, to Excel, etc. Duncan Murdoch In case of 2 columns, header is repeated after 526 items mar<-read.delim("clipboard") which(mar$a2=="a1") [1] 525 1051 1577 diff(which(mar$a2=="a1")) [1] 526 526 and only first header item is repeated. In case of one column, header is repeated after 1107 items mar<-read.delim("clipboard") diff(which(mar$a2=="a2")) [1] 1107 1107 And all items in object are therefore changed to factor. BTW, readxl package works on same excel file smoothly. I will try to download the most recent R version to check it, but it could take some time due to our IT issues. Best regards Petr version _ platform x86_64-w64-mingw32 arch x86_64 os mingw32 system x86_64, mingw32 status Under development (unstable) major 3 minor 5.0 year 2017 month 07 day31 svn rev73003 language R version.string R Under development (unstable) (2017-07-31 r73003) nickname Unsuffered Consequences Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a jsou určeny pouze jeho adresátům. Jestliže jste obdržel(a) tento e-mail omylem, informujte laskavě neprodleně jeho odesílatele. Obsah tohoto emailu i s přílohami a jeho kopie vymažte ze svého systému. Nejste-li zamýšleným adresátem tohoto emailu, nejste oprávněni tento email jakkoliv užívat, rozšiřovat, kopírovat či zveřejňovat. Odesílatel e-mailu neodpovídá za eventuální škodu způsobenou modifikacemi či zpožděním přenosu e-mailu. V případě, že je tento e-mail součástí obchodního jednání: - vyhrazuje si odesílatel právo ukončit kdykoliv jednání o uzavření smlouvy, a to z jakéhokoliv důvodu i bez uvedení důvodu. - a obsahuje-li nabídku, je adresát oprávněn nabídku bezodkladně přijmout; Odesílatel tohoto e-mailu (nabídky) vylučuje přijetí nabídky ze strany příjemce s dodatkem či odchylkou. - trvá odesílatel na tom, že příslušná smlouva je uzavřena teprve výslovným dosažením shody na všech jejích náležitostech. - odesílatel tohoto emailu informuje, že není oprávněn uzavírat za společnost žádné smlouvy s výjimkou případů, kdy k tomu byl písemně zmocněn nebo písemně pověřen a takové pověření nebo plná moc byly adresátovi tohoto emailu případně osobě, kterou adresát zastupuje, předloženy nebo jejich existence je adresátovi či osobě jím zastoupené známá. This e-mail and any documents attached to it may be confidential and are intended only for its intended recipients. If you received this e-mail by mistake, please immediately inform its sender.
Re: [Rd] An interesting chat with ChatGPT
On 2/13/2023 11:14 AM, Kevin Coombes wrote: Chat bots are like politicians, or talking dogs. The fact that they exist is interesting. But no same person would believe anything they say. I think it is more appropriate to be a little less harsh, " no same person would believe EVERYTHING they say" What chatGPT (and politicians) say must be run through your own personal filters and sanity checks ( just like the things even your mother tells you.) ;-) On Mon, Feb 13, 2023, 10:58 AM Boris Steipe wrote: Duncan - Indeed, this has now been well documented; I have called these constructions "Schrödinger Facts", since they arise from a superposition of truths in the training data that collapse into an untruth when observed. https://sentientsyllabus.substack.com/p/chatgpts-achilles-heel Now, the curious question is: why can it program. Why is its production of R-syntax less vulnerable to this effect than a literature quote, or reference? Maybe it has to do with the fact that in producing correct syntax there is a ground truth - errors just will not run. But I'm not sure. Regardless: it signals that we need a reinvigorated culture of validation. Actually ChatGPT will happily make test data for you. Whisvh. in a way, it judt did ;-) Boris On 2023-02-13, at 08:37, Duncan Murdoch wrote: I was wondering which anchor would match in the regular expression "(a)|(b)" if both "a" and "b" matches the target string. What appears to happen is that the first match wins, and that's how it is documented in Python, but I was looking for docs on this in R. As far as I can see, the ?regex help page doesn't resolve this. So just for fun, I decided to ask ChatGPT, and got an interesting response. I won't show the whole conversation here, but just some extracts: --- Me: In a regular expression in R, if both "a" and "b" match, which does "(a)|(b)" match? Please include authoritative references in your answer. ChatGPT: [long answer about grep] Me: In grep(), it doesn't matter which of a or b matches. It's only in sub() or gsub() that it makes a difference. Do you know an authoritative reference that discusses those functions? ChatGPT: [long irrelevant answer about sub and gsub, with a reference to "R Cookbook" by P. Teetor.] Me: Teetor's book is not authoritative, and the other reference doesn't discuss ambiguous alternation. ... finally we get to the interesting part ... ChatGPT: I apologize for the mistake in my previous answer. A more authoritative reference for the behavior of regular expressions in R can be found in the official R documentation. Regarding the behavior of ambiguous alternation, the regex section of the manual "An Introduction to R" explains it as follows: "When several alternatives are possible, the first alternative is chosen, so it is important to specify alternatives in the order in which they should be tried." Here is the reference for the official R documentation: "An Introduction to R" manual: https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Regular-expression-facilities I hope this reference provides the information you were looking for. --- All right, an authoritative answer! The only problem is that *it doesn't exist*. There's no such anchor in that document. R-intro isn't a very rapidly changing document, so I could look at every change recorded in svn, and that section has *never* existed. I guess ChatGPT is a pattern matching machine, and if such a question had an answer, it would probably be in a location like that. (I would have guessed a help page like ?regex instead of R-intro, but I had just told it that answer was wrong.) Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Boris Steipe MD, PhD Professor em. Department of Biochemistry Temerty Faculty of Medicine University of Toronto __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- __ Robert W. Baer, Ph.D. Professor of Physiolgy Kirksville College of Osteopathic Medicine A.T. Still University of Heallth Sciences 800 W. Jefferson St. Kirksville, MO 63501 P: 660-626-2322 The ATSU Mission A.T. Still University of Health Sciences serves as a learning-centered university dedicated to preparing highly competent professionals through innovative academic programs with a commitment to continue its osteopathic heritage and focus on whole person healthcare, scholarship, community health, interprofessional education, diversity, and underserved populations. Proud recipient
Re: [Rd] ADA Compliance
On 1/12/2024 1:50 PM, Hunter, Zayne via R-devel wrote: Hello, I am working with Ball State University to obtain a license of R. R is open source so there really should be no need to "obtain a license for R". This can hopefully reduce the hoops you must jump through. Mostly, I believe you can think of the R license as GPL2/GPL3, but you can read more about other R and R package licenses here: https://www.r-project.org/Licenses/#:~:text=R%20as%20a%20package%20is,%2C%20which%20includes%20GPL%2D3%20. As part of our requirements for obtaining new software, we must review the VPAT for ADA compliance. Can you provide this information for me? Thanks, Zayne Hunter Technology Advisor & Vendor Relations Manager Ball State University zayne.hun...@bsu.edu (765)285-7853 [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Opening and closing quartz graphic device crashes R
On 11/28/2012 5:21 PM, Hadley Wickham wrote: replicate(1000, {dev.new(); dev.off()}) R(83204,0xacdc1a28) malloc: *** mmap(size=16777216) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug R(83204,0xacdc1a28) malloc: *** mmap(size=16777216) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug ... *** caught bus error *** address 0x0, cause 'non-existent physical address' sessionInfo() R version 2.15.2 (2012-10-26) Platform: i386-apple-darwin9.8.0/i386 (32-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base For what its worth, I couldn't reproduce this on 64-bit or 32-bit R GUI consoles. Rob 64-bit windows: null device null device null device null device null device null device -- snip -- 1 1 1 1 1 1 null device null device null device null device 1 1 1 1 > sessionInfo() R version 2.15.2 (2012-10-26) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base 32-bit windows: windows windows windows windows windows windows windows windows windows windows 2 2 2 2 2 2 2 2 2 2 -- snip -- windows windows windows windows windows windows windows windows windows windows 2 2 2 2 2 2 2 2 2 2 > sessionInfo() R version 2.15.2 (2012-10-26) Platform: i386-w64-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base > -- __ Robert W. Baer, Ph.D. Professor of Physiology Kirksille College of Osteopathic Medicine A. T. Still University of Health Sciences Kirksville, MO 63501 USA __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel