Javascript Use String Variable Assignment In R