Re: [Rd] On read.csv and write.csv

2021-07-01 Thread Simon Urbanek
Just for completeness, all this is well documented: CSV files: By default there is no column name for a column of row names. If ‘col.names = NA’ and ‘row.names = TRUE’ a blank column name is added, which is the convention used for CSV files to be read by spreadsheets. Note

Re: [Rd] On read.csv and write.csv

2021-07-01 Thread John Fox
Dear Gabriel, On 2021-07-01 6:29 p.m., Gabriel Becker wrote: On Thu, Jul 1, 2021 at 1:46 PM Stephen Ellison wrote: Please run the reproducible example provided. When you do, you will see that write.csv writes an unnecessary empty header field ("") over the row names column. This makes the nu

Re: [Rd] On read.csv and write.csv

2021-07-01 Thread Gabriel Becker
On Thu, Jul 1, 2021 at 1:46 PM Stephen Ellison wrote: > > Please run the reproducible example provided. > When you do, you will see that write.csv writes an unnecessary empty > header field ("") over the row names column. This makes the number of > header fields equal to the number of columns _in

Re: [Rd] On read.csv and write.csv

2021-07-01 Thread Stephen Ellison
> the "unhelpful" column are the row names. They are considered an > important part of a data frame and therefore the default (row.names = > TRUE) is to not lose them (as there is no way back once you do). If you don't > want to preserve the row names you can simply set row.names=FALSE. Please run

Re: [Rd] [External] SET_COMPLEX_ELT and SET_RAW_ELT missing from Rinternals.h

2021-07-01 Thread Konrad Siek
Thanks! So what would be the prescribed way of assigning elements to a CPLXSXP if I needed to? One way I see is to do what most of the code inside the interpreter does and grab the vector's data pointer: COMPLEX(sexp)[index] = value; COMPLEX0(sexp)[index] = value; This will materialize

Re: [Rd] S3 dispatch does not work for generics defined inside an environment

2021-07-01 Thread Taras Zakharko
Thanks Johannes, I was aware of the modules package (it was not suitable for my needs unfortunately), but I did not know about box… somehow I managed to completely miss it in my search (embarrassing, really). My own package offers similar functionality to box, but is designed to closely fol

Re: [Rd] S3 dispatch does not work for generics defined inside an environment

2021-07-01 Thread Johannes Ranke
> In the end, I wrote a package that implements lightweight python-like > modules for R and that has really improved my workflow. I hope to publish > this package later this year after I have cleaned it up a bit. Hi, are you aware of the previous work in this direction https://github.com/klmr/box

Re: [Rd] S3 dispatch does not work for generics defined inside an environment

2021-07-01 Thread Greg Minshall
Taras, > That was my original plan as well, but managing and deploying dozens > of little packages that are all under active development is a > nightmare even with devtools. Just too much overhead, not to mention > that coming up with names that would not have namespace conflicts was > getting sill

Re: [Rd] On read.csv and write.csv

2021-07-01 Thread Taras Zakharko
Stephen, I am sure one can find a lot of small issues and inconsistencies with R and it’s standard library. It has to support a lot of legacy cruft and the design process — especially in the early days — focused on getting things done rather than delivering a standard library of immaculate qua

Re: [Rd] S3 dispatch does not work for generics defined inside an environment

2021-07-01 Thread Taras Zakharko
Hi Greg, That was my original plan as well, but managing and deploying dozens of little packages that are all under active development is a nightmare even with devtools. Just too much overhead, not to mention that coming up with names that would not have namespace conflicts was getting silly.