Being new to R, can someone please explain the difference between paste()
and paste0()
, what I had understood from some post is that
p
Let me put it in a simple words.. paste0
will automatically exclude the space in your concatenation..
For Example, I want to create a Training and test path..here's the code..
> Curr_date=format(Sys.Date(),"%d-%b-%y")
> currentTrainPath = paste("Train_",Curr_date,".RData")
> currentTrainPath
[1] "Train_ 11-Jun-16 .RData"
> Curr_date=format(Sys.Date(),"%d-%b-%y")
> currentTrainPath = paste0("Train_",Curr_date,".RData")
> currentTrainPath
[1] "Train_11-Jun-16.RData"