Dennis Murphy | 1 Feb 2011 05:18
Picon

Re: Simple Boxplot Question- unexpected string constant error

Hi:

Put an equals sign between xlab and '

Dennis

On Mon, Jan 31, 2011 at 6:39 PM, MarquisDM <mszenteczki <at> gmail.com> wrote:

>
> Hi everyone,
>
> Sorry for the newbie question but whenever I enter the following code into
> r
> it gives me an  unexpected string constant in
> "boxplot(Abs~Conc,ylab='Absorbency',xlab'Ethanol(%)'" error. I have tried
> everything to eliminate it and have searched these forums to no avail, can
> anyone tell me what to do to allow r to generate my boxplot for me? Here is
> my code:
>
> A=c(0.37,0.38,1.1,1.1,0.65,0.61,0.56,0.74,0.71,0.60)
> B=c(0.66,0.63,0.85,0.9,0.8,0.9,0.8,0.8,0.41,0.49)
> C=c(1.2,1.2,1.4,1.35,1.2,1.2,1.35,1.75,0.86,0.8)
> D=c(1.1,1.2,1.2,0.8,1.1,0.85,0.94,1.4,0.88,0.63)
>
> Abs=c(A,B,C,D)
>
> Conc=c('0','0','0','0','0','0','0','0','0','0','20','20','20','20','20','20','20','20','20','20','30','30','30','30','30','30','30','30','30','30','40','40','40','40','40','40','40','40','40','40')
>
> boxplot(Abs~Conc,ylab='Absorbency',xlab'Ethanol(%)')
>
(Continue reading)


Gmane