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

single quote doesn't work for Rscript on Windows 10 #44

Closed
ChuliangXiao opened this issue May 7, 2020 · 5 comments
Closed

single quote doesn't work for Rscript on Windows 10 #44

ChuliangXiao opened this issue May 7, 2020 · 5 comments

Comments

@ChuliangXiao
Copy link

ChuliangXiao commented May 7, 2020

Rscript -e 'servr::httd("/directory/", port = 4000, host = "0.0.0.0")' with error

Error: unexpected end of input
Execution halted

Rscript -e "servr::httd('/directory/', port = 4000, host = '0.0.0.0')" works

@yihui
Copy link
Owner

yihui commented May 7, 2020

Thanks, but:

  1. Where did you find the first command? If it is from my code, where should I correct it?

  2. You might have missed a single quote at the end of the first command. I don't have Windows open right now, so I can't verify it.

    Rscript -e 'servr::httd("/directory/", port = 4000, host = "0.0.0.0")'

@ChuliangXiao
Copy link
Author

ChuliangXiao commented May 7, 2020

Thanks, but:

  1. Where did you find the first command? If it is from my code, where should I correct it?

In your README.md file, you used single quotes.

# default: port 4321, do not launch browser
Rscript -e 'servr::httd()'

# open a web browser
Rscript -e 'servr::httd()' -b

# listen on port 4000
Rscript -e 'servr::httd()' -p4000

# pass arguments to the httd() function
Rscript -e 'servr::httd(,4000,TRUE)'
  1. You might have missed a single quote at the end of the first command. I don't have Windows open right now, so I can't verify it.
    Rscript -e 'servr::httd("/directory/", port = 4000, host = "0.0.0.0")'

Yes, I missed a single quote. Thanks.

@ChuliangXiao ChuliangXiao changed the title single quote '' doesn't work for Rscript on Windows 10 single quote doesn't work for Rscript on Windows 10 May 7, 2020
@yihui
Copy link
Owner

yihui commented May 7, 2020

Does it work after you add the missing single quote? Thanks!

@ChuliangXiao
Copy link
Author

Does it work after you add the missing single quote? Thanks!

No. Have to use double quotes.

@yihui
Copy link
Owner

yihui commented May 8, 2020

Got it. Thanks!

@yihui yihui closed this as completed in c7f575f May 8, 2020
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