Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add similar dput function to node sets #210

Closed
cimentadaj opened this issue Feb 12, 2018 · 1 comment
Closed

Add similar dput function to node sets #210

cimentadaj opened this issue Feb 12, 2018 · 1 comment

Comments

@cimentadaj
Copy link

Issue Description and Expected Result

For reprex examples it might be useful to have an equivalent dput for nodes/nodesets.

A 2 nodeset example from dput which crashes when saved.

x <- structure(list(structure(list(node = <pointer: 0x111b131d0>, 
    doc = <pointer: 0x101b85230>), .Names = c("node", "doc"), class = "xml_node"), 
    structure(list(node = <pointer: 0x111b13330>, doc = <pointer: 0x101b85230>), .Names = c("node", 
    "doc"), class = "xml_node")), class = "xml_nodeset")
Session info -------------------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.4.3 (2017-11-30)
 system   x86_64, darwin15.6.0        
 ui       RStudio (1.1.383)           
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       Europe/Madrid               
 date     2018-02-12                  

Packages -----------------------------------------------------------------------------------------------------------------------------
 package   * version date       source                         
 base      * 3.4.3   2017-12-07 local                          
 compiler    3.4.3   2017-12-07 local                          
 datasets  * 3.4.3   2017-12-07 local                          
 devtools    1.13.4  2017-11-09 CRAN (R 3.4.2)                 
 digest      0.6.15  2018-01-28 cran (@0.6.15)                 
 graphics  * 3.4.3   2017-12-07 local                          
 grDevices * 3.4.3   2017-12-07 local                          
 memoise     1.1.0   2018-02-08 Github (hadley/memoise@611cfad)
 methods   * 3.4.3   2017-12-07 local                          
 stats     * 3.4.3   2017-12-07 local                          
 tools       3.4.3   2017-12-07 local                          
 utils     * 3.4.3   2017-12-07 local                          
 withr       2.1.1   2017-12-19 cran (@2.1.1) 
@jimhester
Copy link
Member

It isn't actually possible to define methods for dput() or dump(), and XPtrs output as you show, so there unfortunately isn't actually much we can do about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants