Re: [Rd] sprintf, check number of parameters

2021-02-25 Thread Tomas Kalibera
On 2/22/21 11:34 AM, Duncan Murdoch wrote: This is ugly, but I think it's legal, and it doesn't trigger a warning:  output unused parameters as zero-length strings:  msnx(T0, mask = '%1$.1f (SD=%2$.1f)%3$.0s%4$.0s') Perhaps an example using %.0s could be included to show how to skip a value.

Re: [Rd] read.csv, worrying behaviour?

2021-02-25 Thread TAYLOR, Benjamin (BLACKPOOL TEACHING HOSPITALS NHS FOUNDATION TRUST) via R-devel
Dear all I've been using R for around 16 years now and I've only just become aware of a behaviour of read.csv that I find worrying which is why I'm contacting this list. A simplified example of the behaviour is as follows I created a "test.csv" file containing the following lines: a,b,c,d,e,f,

Re: [Rd] read.csv, worrying behaviour?

2021-02-25 Thread Kevin R. Coombes
I believe this is documented behavior. The 'read.csv' function is a front-end to 'read.table' with different default values. IN this particular case, read.csv sets fill = TRUE, which means that it is supposed to fill incomplete lines with NA's. It also sets header=TRUE, which is presumably what