varname <- readline("Please name your variable >")

varname <- make.names(varname)
message(paste("The variable being assigned is '", varname, "'"))

assign(varname, 42)

ls(pattern=varname)
get(varname)