Skip to content

NA and "NA" characters break convert to localDiskConn after divide #88

@jrounds

Description

@jrounds

Hi,

I call it an "issue". I have a data set with a 2 character code in a vector, and I noticed this scenario:

V1 = c("NA", "DO", "CO", "SH", "VA", as.character(NA))
V1
V2 = runif(length(V1))
data = data.frame(V1=V1, V2=V2)
from = divide(data, by="V1")
tmp = tempfile()
to = localDiskConn(tmp, autoYes=TRUE)
convert(from, to)
Error in getFileLocs(conn, keys) : 
  There are duplicate keys - not currently supported

The solution is either define the NA (missing) as a character string that is unused or change the "NA" character code to something else.

The nature of this error brings it all the way down to the key choice of datadr. Both the "NA" and the NA have key
"V1=NA"

To be clear, this issue is not pressing for me. I have obvious work arounds. Just thought I would note it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions