В Thu, 18 Apr 2024 19:04:04 +0200
<sibylle.stoec...@gmx.ch> пишет:

> Solution: direct and full path to the .tif files.
> I confused back and forward slash

Congratulations on solving the problem yourself!

Here's a few more options that could be useful in the future:

1. Double the backslashes. Between single quotes ('...') and double
quotes ("..."), backslashes have a special meaning. This makes it
possible to enter characters without typing them directly (e.g. '\uf6'
results in "ö") or put quotes inside quoted strings (e.g. message('\'')
prints a single quote), but in order to mean \, you have to type \\:

path = "C:\\Users\\Sibylle 
Stöckli\\Desktop\\NCCS_Impacts_Lot2_2022\\InVEST\\Species_Input\\valpar_bee_presence"

2. Use the special "raw character constant" syntax where backslashes
don't have a special meaning:

path = r"{C:\Users\Sibylle 
Stöckli\Desktop\NCCS_Impacts_Lot2_2022\InVEST\Species_Input\valpar_bee_presence}"

These two options are explained in help(Quotes).

3. Instead of typing the path, use choose.dir() (Windows only, I think)
and select it interactively. You can print() the return value and copy
and paste it into the script later.

-- 
Best regards,
Ivan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to