Re: [Rd] NEWS item about PR#17284
> Suharto Anggono Suharto Anggono via R-devel > on Mon, 18 Sep 2017 16:11:53 + writes: > Previous mentions: > - https://stat.ethz.ch/pipermail/r-devel/2017-July/074723.html > - https://stat.ethz.ch/pipermail/r-devel/2017-August/074737.html > The NEWS item corresponding to PR#17284 is in "CHANGES in R-devel". However, fix for PR#17284 is already included in R 3.4.2 beta. Thank you, I'm sorry for not having acted sooner on this... and will do now. Note that this *also* applies to the PR#17292. R/src/main/bind.c has been identical in R-devel and R-patched (i.e. 3.4.2 beta) for quite some time, and the NEWS entries must be moved to 3.4.2 beta. Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] NEWS item about PR#17284
> Martin Maechler > on Tue, 19 Sep 2017 09:18:46 +0200 writes: > Suharto Anggono Suharto Anggono via R-devel > on Mon, 18 Sep 2017 16:11:53 + writes: >> Previous mentions: >> - https://stat.ethz.ch/pipermail/r-devel/2017-July/074723.html >> - https://stat.ethz.ch/pipermail/r-devel/2017-August/074737.html >> The NEWS item corresponding to PR#17284 is in "CHANGES in R-devel". However, fix for PR#17284 is already included in R 3.4.2 beta. > Thank you, I'm sorry for not having acted sooner on this... and > will do now. done. The following is partly wrong: The news entry for PR#17292 had been in NEWS for R 3.4.2 beta already. > Note that this *also* applies to the PR#17292. > R/src/main/bind.c has been identical in R-devel and R-patched > (i.e. 3.4.2 beta) for quite some time, and the NEWS entries must > be moved to 3.4.2 beta. > Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] issue with promises for time parameter of rep()
Greetings, The following is based on a question I raised on Stackoverflow: https://stackoverflow.com/questions/46280120/calling-printls-str-in-function-affect-behavior-of-rep/46283979#46283979 Start a new R session with an empty Global Env. Then define: f <- function(n) { print(ls.str()) rep("hello", times = n) } Now run: f(x) Instead of getting the expected "object 'x' not found" error, you get: n : [1] "hello" It was suggested that I file the issue here as a possible bug. Regards, Homer [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] issue with promises for time parameter of rep()
Here is the same issue with closures: g <- function(n) { missing(n) } f <- function(n, force) { if (force) { tryCatch(n, error = function(...) NULL) } g(n) } g(`_x`) #> [1] FALSE f(`_x`, force = FALSE) #> [1] FALSE f(`_x`, force = TRUE) #> [1] TRUE Lionel > On 18 sept. 2017, at 19:06, Homer White wrote: > > Greetings, > > The following is based on a question I raised on Stackoverflow: > > https://stackoverflow.com/questions/46280120/calling-printls-str-in-function-affect-behavior-of-rep/46283979#46283979 > > Start a new R session with an empty Global Env. Then define: > > f <- function(n) { > print(ls.str()) > rep("hello", times = n) > } > > Now run: > > f(x) > > Instead of getting the expected "object 'x' not found" error, you get: > > n : [1] "hello" > > It was suggested that I file the issue here as a possible bug. > > > Regards, > > Homer > > [[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
[Rd] R and Visual Studio
Hi, I am trying to build R using Visual Studio 2010 but without success. My question is if it possible build R with this compiler anyway? If not, could someone please tell how to link one's C code against both the static and shared libraries of R for Windows (that comes from the official website found here https://cran.r-project.org/mirrors.html)? Thank you! __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R and Visual Studio
On 19 September 2017 at 12:53, lille stor wrote: | I am trying to build R using Visual Studio 2010 but without success. My question is if it possible build R with this compiler anyway? In general, no. [ I believe there is an exception if you're a true compiler expert and really know what you're doing. No such person is part of the wider R community as far as I know. ] | If not, could someone please tell how to link one's C code against both the static and shared libraries of R for Windows (that comes from the official website found here https://cran.r-project.org/mirrors.html)? By reading the Fine Manuals that came with your version of R, in particular 'R Installation and Administration' and 'Writing R Extensions'. You will need to install Rtools which provides the compiler R uses on Windows. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R and Visual Studio
On 19 September 2017 at 07:07, Dirk Eddelbuettel wrote: | [ I believe there is an exception if you're a true compiler expert and really | know what you're doing. No such person is part of the wider R community as | far as I know. ] This was missing an important qualifier for "with particular knowledge of visual c/++ and windows". Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] what do you think about write.table(... qmethod = "excel")?
Last week one of our clients reported trouble with a csv file I generated with write.table. He said that columns with quotes for character variables were rejected by their data importer, which was revised to match the way Microsoft Excel uses quotation marks in character variables. I explained to them that quoted character variables are virtuous and wise, of course, but they say Microsoft Excel CSV export no longer quotes characters unless they include commas in the values. They showed me a CSV file from Excel that looked like this x1,x2,x3,x4 5 6 fred,barney,betty,x bambam,"fred,wilma",pebbles,y Note how the quotes only happen on row 2 column 2. I was surprised it did that, but now I have some pressure to write a csv maker that has that structure. Its weird, even when there are spaces in values there are no quotation marks. Has anybody done this and verified that it matches CSV from MS Excel? If I succeed will you consider a patch? pj -- Paul E. Johnson http://pj.freefaculty.org Director, Center for Research Methods and Data Analysis http://crmda.ku.edu To write to me directly, please address me at pauljohn at ku.edu. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] issue with promises for time parameter of rep()
Thanks. Fixed in R-devel and R-patched. This now gives f <- function(n) { print(ls.str()) rep("hello", times = n) } f(n) ## n : ## Error in f(n) : object 'n' not found ## In addition: Warning message: ## In f(n) : restarting interrupted promise evaluation Best, luke On Mon, 18 Sep 2017, Homer White wrote: Greetings, The following is based on a question I raised on Stackoverflow: https://stackoverflow.com/questions/46280120/calling-printls-str-in-function-affect-behavior-of-rep/46283979#46283979 Start a new R session with an empty Global Env. Then define: f <- function(n) { print(ls.str()) rep("hello", times = n) } Now run: f(x) Instead of getting the expected "object 'x' not found" error, you get: n : [1] "hello" It was suggested that I file the issue here as a possible bug. Regards, Homer [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Luke Tierney Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics andFax: 319-335-3017 Actuarial Science 241 Schaeffer Hall email: luke-tier...@uiowa.edu Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] what do you think about write.table(... qmethod = "excel")?
On 19 September 2017 at 12:04, Paul Johnson wrote: | They showed me a CSV file from Excel that looked like this | | x1,x2,x3,x4 5 6 | fred,barney,betty,x | bambam,"fred,wilma",pebbles,y | | Note how the quotes only happen on row 2 column 2. I was surprised it | did that, but now I have some pressure to write a csv maker that has | that structure. Its weird, even when there are spaces in values there | are no quotation marks. | | Has anybody done this and verified that it matches CSV from MS Excel? | If I succeed will you consider a patch? R> data.table::fread("/tmp/paul.csv") x1 x2 x3 x4 5 6 1: fred barney betty x 2: bambam fred,wilma pebbles y R> data.table::fread("/tmp/paul.csv") x1 x2 x3 x4 1: fred barney betty x 2: bambam fred,wilma pebbles y R> The only difference is that between calls one and two, I removed the stray "5 6" from the first line. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] what do you think about write.table(... qmethod = "excel")?
On Tue, Sep 19, 2017 at 1:04 PM, Paul Johnson wrote: > Last week one of our clients reported trouble with a csv file I > generated with write.table. He said that columns with quotes for > character variables were rejected by their data importer, which was > revised to match the way Microsoft Excel uses quotation marks in > character variables. I explained to them that quoted character > variables are virtuous and wise, of course, but they say Microsoft > Excel CSV export no longer quotes characters unless they include > commas in the values. > > They showed me a CSV file from Excel that looked like this > > x1,x2,x3,x4 5 6 > fred,barney,betty,x > bambam,"fred,wilma",pebbles,y > > Note how the quotes only happen on row 2 column 2. I was surprised it > did that, but now I have some pressure to write a csv maker that has > that structure. I think you should resist that pressure. It really makes no sense to write a .csv parser that _only_ supports .csv files created by Excel. If you're going to use Excel as a model, a more sensible approach would be to write a csv parser that supports all the formats that Excel itself supports; Excel of course has no problem importing "x1","x2","x3","x4" "fred","barney","betty","x" "bambam","fred,wilma","pebbles","y" So, seriously, tell them to just fix their csv parser. Since they seem hung up on Excel, it may help to point out that it does in fact import csv produced by write.csv without complaint. Best, Ista Its weird, even when there are spaces in values there > are no quotation marks. > > Has anybody done this and verified that it matches CSV from MS Excel? > If I succeed will you consider a patch? > > pj > -- > Paul E. Johnson http://pj.freefaculty.org > Director, Center for Research Methods and Data Analysis http://crmda.ku.edu > > To write to me directly, please address me at pauljohn at ku.edu. > > __ > 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] what do you think about write.table(... qmethod = "excel")?
On 19/09/2017 4:10 PM, Ista Zahn wrote: On Tue, Sep 19, 2017 at 1:04 PM, Paul Johnson wrote: Last week one of our clients reported trouble with a csv file I generated with write.table. He said that columns with quotes for character variables were rejected by their data importer, which was revised to match the way Microsoft Excel uses quotation marks in character variables. I explained to them that quoted character variables are virtuous and wise, of course, but they say Microsoft Excel CSV export no longer quotes characters unless they include commas in the values. They showed me a CSV file from Excel that looked like this x1,x2,x3,x4 5 6 fred,barney,betty,x bambam,"fred,wilma",pebbles,y Note how the quotes only happen on row 2 column 2. I was surprised it did that, but now I have some pressure to write a csv maker that has that structure. I think you should resist that pressure. That depends on whether this is a paying client or not. > It really makes no sense to write a .csv parser that _only_ supports .csv files created by Excel. That's true, but if that's what they want to do, and they're willing to pay to be able to write files that imitate Excel, then why not do what they ask? On the other hand, if they aren't willing to pay for the work, then you should lecture them on how silly their request is. In any case, base R functions should not include nonsense, so this is not something that should go into R. Duncan Murdoch If you're going to use Excel as a model, a more sensible approach would be to write a csv parser that supports all the formats that Excel itself supports; Excel of course has no problem importing "x1","x2","x3","x4" "fred","barney","betty","x" "bambam","fred,wilma","pebbles","y" So, seriously, tell them to just fix their csv parser. Since they seem hung up on Excel, it may help to point out that it does in fact import csv produced by write.csv without complaint. Best, Ista Its weird, even when there are spaces in values there are no quotation marks. Has anybody done this and verified that it matches CSV from MS Excel? If I succeed will you consider a patch? pj -- Paul E. Johnson http://pj.freefaculty.org Director, Center for Research Methods and Data Analysis http://crmda.ku.edu To write to me directly, please address me at pauljohn at ku.edu. __ 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 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel