Hi, I am new to R and I have been trying it out. I ran into a problem with the plot() function. Below is my code: > d <- read.table("c:/test/sp.txt",header=0)> spval <- d[,2] > plot(spval,type="l")Warning messages: 1: graphical parameter "type" is obsolete in: plot.window(xlim, ylim, log, asp, ...) 2: graphical parameter "type" is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, 3: graphical parameter "type" is obsolete in: title(main, sub, xlab, ylab, line, outer, ...) 4: graphical parameter "type" is obsolete in: axis(side, at, labels, tick, line, pos, outer, font, lty, lwd, I tried to plot a line graph from a text file with two columns. Some how R won't plot the data as lines, and it kept giving me the same warning: "type" is obsolete. What does this mean? Am I doing something wrong, or is the parameter really obsolete, or do I need install some package? Thanks, Tom [[alternative HTML version deleted]]
On 10/16/2006 9:44 AM, tom soyer wrote:> Hi, > > I am new to R and I have been trying it out. I ran into a problem with the > plot() function. Below is my code: > > > d <- read.table("c:/test/sp.txt",header=0) >> spval <- d[,2] >> plot(spval,type="l") > Warning messages: > 1: graphical parameter "type" is obsolete in: plot.window(xlim, ylim, log, > asp, ...) > 2: graphical parameter "type" is obsolete in: axis(side, at, labels, tick, > line, pos, outer, font, lty, lwd, > 3: graphical parameter "type" is obsolete in: title(main, sub, xlab, ylab, > line, outer, ...) > 4: graphical parameter "type" is obsolete in: axis(side, at, labels, tick, > line, pos, outer, font, lty, lwd, > > I tried to plot a line graph from a text file with two columns. Some how R > won't plot the data as lines, and it kept giving me the same warning: "type" > is obsolete. What does this mean? Am I doing something wrong, or is the > parameter really obsolete, or do I need install some package?I wouldn't expect to see those messages, but you don't tell us what version of R you're using, on what platform, and don't tell us what spval looks like. I'm guessing that spval is a factor. Plotting a factor will plot a bar plot of the counts of the levels; it doesn't make sense to ask for type="l". Duncan Murdoch
It's possible the problem is with your data; could you provide some sample data with which we can reproduce the error? On 16/10/06, tom soyer <tom.soyer at gmail.com> wrote:> Hi, > > I am new to R and I have been trying it out. I ran into a problem with the > plot() function. Below is my code: > > > d <- read.table("c:/test/sp.txt",header=0) > > spval <- d[,2] > > plot(spval,type="l") > Warning messages: > 1: graphical parameter "type" is obsolete in: plot.window(xlim, ylim, log, > asp, ...) > 2: graphical parameter "type" is obsolete in: axis(side, at, labels, tick, > line, pos, outer, font, lty, lwd, > 3: graphical parameter "type" is obsolete in: title(main, sub, xlab, ylab, > line, outer, ...) > 4: graphical parameter "type" is obsolete in: axis(side, at, labels, tick, > line, pos, outer, font, lty, lwd, > > I tried to plot a line graph from a text file with two columns. Some how R > won't plot the data as lines, and it kept giving me the same warning: "type" > is obsolete. What does this mean? Am I doing something wrong, or is the > parameter really obsolete, or do I need install some package? > > Thanks, > > Tom > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- ================================David Barron Said Business School University of Oxford Park End Street Oxford OX1 1HP