A simple recipe for creating Rproj from command line.

#!/bin/bash

ext=".Rproj"
file=${PWD##*/}$ext
echo ':::'$file':::'

str="
Version: 1.0\n\n
RestoreWorkspace: Default\n
SaveWorkspace: Default\n
AlwaysSaveHistory: Default\n\n
EnableCodeIndexing: Yes\n
UseSpacesForTab: Yes\n
NumSpacesForTab: 4\n
Encoding: UTF-8\n\n
RnwWeave: Sweave\n
LaTeX: pdfLaTeX\n
"

echo -e -n $str | tr -d ' ' > $file