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

Error in nchar(var) : invalid multibyte string 1 #15

Open
gpinkham opened this issue Mar 24, 2015 · 2 comments
Open

Error in nchar(var) : invalid multibyte string 1 #15

gpinkham opened this issue Mar 24, 2015 · 2 comments

Comments

@gpinkham
Copy link

curious if you know how I could "pull" this list from R.. when I do I get the error from the title.. The data is coming from a SAS XPT file that I read into R using the SASxport library..

vars$VD$label
[1] "Study Identifier"
[2] "Unique Subject Identifier"
[3] "Site Name"
[4] "Site Number"
[5] "Subject ID"
[6] "System Visit Name"
[7] "Visit Name"
[8] "Page Name"
[9] "Page Sequence Number"
[10] "Line Number"
[11] "Did the visit occur - Decoded"
[12] "Did the visit occur"
[13] "Date of Visit - Numeric"
[14] "Date of Visit"
[15] "Visit occur at patient\x92s home - Decoded"
[16] "Visit occur at patient\x92s home"

@gpinkham
Copy link
Author

I forgot to mention that after that error is displayed the program just hangs.. have to kill it hard.. I made a quick patch to add ,allowNA=TRUE to the nchar(var) line in rinruby.rb (line 586).. that prevented the error from happening but now it just hangs at that pull command and I have to kill it again..

@gpinkham
Copy link
Author

BTW.. i got around this by doing this before I pull..

  r.eval "foo = vars$#{domain}$label"
  r.eval "for (i in 1:length(foo)) { foo[i] = (gsub('\\x92','', foo[i])) }"
  labels = r.pull('foo')

I'll leave this open in case you wanted to look into it. .otherwis feel free to close.. Thanks!!

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

1 participant