last.n.char | R Documentation |
String functions; last.n.char returns the last ānā characters of the input string
last.n.char(x, n)
x |
string; length > n |
n |
integer; number of characters to be returned |
string; length (n)
Angus H Wright ICRAR angus.wright@icrar.org
measure.fluxes, read.par.file
#Load LAMBDAR
library(LAMBDAR)
#Show the last 6 characters of a random string
string<-"Methinks it is like a weasel"
print(last.n.char(string,6))
#Is the last character of the filename a '/'?
path<-getwd()
#Using getwd alone: No
last.n.char(path,1)=="/"
#Using getwd and file.path: Yes
last.n.char(file.path(path,""),1)=="/"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.