I am trying to build a program, in which a user would enter the desired part of data to plot and the R program would plot it. For example:
n<- function(){
readline(prompt="enter x value to plot")
}
m<- function{
readline(prompt="enter y value to plot")
}
attach(dataset)
plot(unquote(n()), unquote(m()), main="Scatterplot Example", pch=20)
yet this doesnt work, the plot function doesnt recognise the m() and n()? Am I missing somehing?
Thank you.
unquotedefined? There is a syntax error in your definition ofm. Always report error messages if something "doesn't work".