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

unused argument (encoding = "native.enc") #1050

Closed
ghost opened this issue Nov 6, 2022 · 5 comments
Closed

unused argument (encoding = "native.enc") #1050

ghost opened this issue Nov 6, 2022 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 6, 2022

Replicate

Install styler:

sudo su -
R
install.package( "styler" )

Use styler:

cd /tmp
wget https://raw.githubusercontent.com/DaveJarvis/keenwrite/master/R/possessive.R
R
library( "styler" )
style_file( "possessive.R" )

Expected

File is reformatted.

Actual

File is not reformatted.

Styling  1  files:
 possessive.R ⚠ 
────────────────────────────────────────
Status	Count	Legend 
✔ 	0	File unchanged.
ℹ 	0	File changed.
✖ 	1	Styling threw an error.
────────────────────────────────────────
Warning message:
When processing possessive.R: unused argument (encoding = "native.enc") 

Environment

$ R --version
R version 4.2.2 (2022-10-31) -- "Innocent and Trusting"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
@lorenzwalthert
Copy link
Collaborator

Thanks @DaveJarvis. There seem to be multiple problems that we should address (warning, no info about the error, error itself etc.). One to quickly fix is a minimal version requirement for {withr}. Can you download at least version 2.3 and retry and we see if it solves at least one of the problems?

@ghost
Copy link
Author

ghost commented Nov 6, 2022

Can you download at least version 2.3 and retry and we see if it solves at least one of the problems?

I'm not super skilled with R. If you provide the exact set of R commands to execute, I'll try them.

@lorenzwalthert
Copy link
Collaborator

Sure. Easiest is to just get the latest version with

install.packages('withr')

And then re-start the R session.

@ghost
Copy link
Author

ghost commented Nov 7, 2022

Worked.

> style_file( "possessive.R" )
Styling  1  files:
 possessive.R ℹ 
────────────────────────────────────────
Status	Count	Legend 
✔ 	0	File unchanged.
ℹ 	1	File changed.
✖ 	0	Styling threw an error.
────────────────────────────────────────
Please review the changes carefully!

@lorenzwalthert
Copy link
Collaborator

We've added a minimal version requirement for {withr} in #1051. Hence I propose to close this issue.

@ghost ghost closed this as completed Nov 7, 2022
This issue was closed.
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