Skip to content

Unicode error coming from factors #43

@ofajardo

Description

@ofajardo

While trying to read this apparently simple rdata file, the following error arises:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb1 in position 1: invalid start byte

The problem comes apparently from the fact most information is stored as levels (all variables are factors). IF transforming those factors into characters, then the file is read ok:

i <- sapply(rlvnc2, is.factor)
rlvnc2[i] <- lapply(rlvnc2[i], as.character)

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