In R, the file path must be in forward slash format. In Window OS, the file path is placed in back slash format. Converting it to forward slash is a pain in the ass.
R Code : Converting backslash file path to forward slash
FSlash<- function(path = "clipboard") {
y <- if (path == "clipboard") {
readClipboard()
} else {
cat("Please enter the path:\n\n")
readline()
}
x <- chartr("\\", "/", y)
writeClipboard(x)
return(x)
}
Step I : Run the above code (Once per session. Ignore if already run once)
Step II : Copy path of your file
Step III : Run FSlash()Step II : Copy path of your file
Step IV : Press CTRL V to get name of your file path
thanks alot
ReplyDeleteDeepanshu, A very neat code! I used to use the 'search & replace' function in Notepad itself to convert BS into FS. Your effort is very elegant. Thanks.
ReplyDeleteBeing able to work in Command Line Interface, like Windows DOS, is a clear-cut plus and often the key to rescue when diagnosing problems and troubleshooting.
ReplyDeletedownloadshareitapp.com - shareit app for android
The computer problems and issues may cease your computer performance but the fast recovery can help you to fix the issues well on time. Any perturbations can be timely fixed and the worries can be put to rest with computer tech support.Techwitty
ReplyDelete. If you understand the benefits of hiring a high tech firm, then you will want to get the most out of this choice, and that would mean putting Darknet Proxy
ReplyDeleteCompany on the top of your list.