PHP では、ドットを使用して文字列を貼り付けることができます。
$path = "/path/to/directory/";
$extension =".txt";
$filecounter = $i; // from some loop for creating multiple files
$file = $path . "filename_". $filecounter . $extension;
Rで同様のことを行うにはどうすればよいですか?
path <- "/path/to/directory/"
extension <- ".txt"
filecounter <- i
file <- paste(path, paste(paste("filename", $filecounter, sep =""), extension, sep =""), sep ="")
このような単純なタスクには、余分な入力がたくさんあるようです。