8000 Logical values not handled correctly · Issue #7 · trestletech/shinyStore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Logical values not handled correctly #7
Open
@tkstring

Description

@tkstring

If a single logical value is stored without encryption, it isn't recovered correctly and throws an error in line 9 of encrypt.R. I discovered this while storing a binary checkbox input value in a Shiny app. The problem is actually a bigger one with RJSONIO (I think), but it would be easily worked around on your end. A simplified version of what's going on:

> fromJSON(toJSON(list(encV=FALSE,data=FALSE)))$data
Error in fromJSON(toJSON(list(encV = FALSE, data = FALSE)))$data : $ operator is invalid for atomic vectors

As opposed to this:

> fromJSON(toJSON(list(encV=FALSE,data=FALSE)))[["data"]]
[1] FALSE

RJSONIO seems to return lists of only logicals as a named logical vector. This could be fixed by changing return(js$data) in line 9 of encrypt.R to return(js[["data"]]). Or by switching to jsonlite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0