Re: [R] Finding Source of Error Message of 'Non-Unique Index Entries' [FIXED]

2012-01-04 Thread Rich Shepard

On Wed, 4 Jan 2012, David Winsemius wrote:

Nothing attached. I don't know what you entitled teh compressed dput output 
but it did not pass the filters of the mailserver and you did not copy me.


David,

  It must have been stripped off as too large (14K).

  Regardless, I solved the problem:

  The examples in the subset help page show only a single row criterion
being used, but does not explicitly note that rows can be selected only one
criterion at a time.

  Because the issue showed up only with the subset() function to extract
rows with the parameter TDS, the problem had to be in that syntax. By
changing the data frame argument to subset() from the overall chemdata to
that of only a single stream, creation of the zoo object threw no errors and
duplicated() returned zero rows.

  Wow! And I thought I understood the subset() syntax. I now do!

Thanks to you, Gabor, and everyone else who responded to this thread,

Rich

__
R-help@r-project.org 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] Finding Source of Error Message of 'Non-Unique Index Entries' [FIXED]

2012-01-04 Thread David Winsemius


On Jan 4, 2012, at 3:21 PM, Rich Shepard wrote:


On Wed, 4 Jan 2012, David Winsemius wrote:

Nothing attached. I don't know what you entitled teh compressed  
dput output but it did not pass the filters of the mailserver and  
you did not copy me.


David,

 It must have been stripped off as too large (14K).

 Regardless, I solved the problem:

 The examples in the subset help page show only a single row criterion
being used, but does not explicitly note that rows can be selected  
only one

criterion at a time.


Because that is simply not true. Connect your criteria with ampersands  
and you can have as many as you want. The only requirement is that the  
logical vector that results be exactly the number of rows in the  
dataframe  as described in the help page.




 Because the issue showed up only with the subset() function to  
extract

rows with the parameter TDS, the problem had to be in that syntax. By
changing the data frame argument to subset() from the overall  
chemdata to
that of only a single stream, creation of the zoo object threw no  
errors and

duplicated() returned zero rows.

 Wow! And I thought I understood the subset() syntax. I now do!

Thanks to you, Gabor, and everyone else who responded to this thread,

Rich

__
R-help@r-project.org 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.


David Winsemius, MD
West Hartford, CT

__
R-help@r-project.org 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.