[R] Plots from categorial data

From: Christoph Krammer <ck_at_altaica.de>
Date: Fri, 29 Jun 2007 21:32:39 +0200


Software zur Erkennung von "Spam" auf dem Rechner

    hypatia.math.ethz.ch

hat die eingegangene E-mail als mögliche "Spam"-Nachricht identifiziert. Die ursprüngliche Nachricht wurde an diesen Bericht angehängt, so dass Sie sie anschauen können (falls es doch eine legitime E-Mail ist) oder ähnliche unerwünschte Nachrichten in Zukunft markieren können. Bei Fragen zu diesem Vorgang wenden Sie sich bitte an

    the administrator of that system

Vorschau: Hello everybody, I want to use R to generate plots from categorial

   data. The data contains results from OCR scans over images with are preprocessed    by different image filtering techniques. A small sample data set looks as    following: [...]

Inhaltsanalyse im Detail: (5.5 Punkte, 5.0 benötigt)

Pkte Regelname Beschreibung

---- ---------------------- --------------------------------------------------
 0.0 DKIM_POLICY_SIGNSOME   Domain Keys Identified Mail: policy says domain
                            signs some mails
 1.0 BAYES_60               BODY: Spamwahrscheinlichkeit nach Bayes-Test: 60-80%
                            [score: 0.7481]
 4.5 AWL                    AWL: From: address is in the auto white-list




attached mail follows:


Hello everybody,

I want to use R to generate plots from categorial data. The data contains results from OCR scans over images with are preprocessed by different image filtering techniques. A small sample data set looks as following:

> data <- read.csv("d:/tmp_da/sql_data/filter_d_tool.csv", header=T)
> data

      ocrtool filter_setting avg.hit.
1  FineReader            2x1    0.383
2  FineReader            2x2    0.488
3  FineReader            3x2    0.268
4  FineReader            3x3    0.198
5  FineReader            4x3    0.081
6  FineReader            4x4    0.056
7        gocr            2x1    0.153
8        gocr            2x2    0.102
9        gocr            3x2    0.047
10       gocr            3x3    0.052
11       gocr            4x3    0.014
12       gocr            4x4    0.002
13      ocrad            2x1    0.085
14      ocrad            2x2    0.094
15      ocrad            3x2    0.045
16      ocrad            3x3    0.050
17      ocrad            4x3    0.025
18      ocrad            4x4    0.009


I now want to draw a plot with the categories (filter_setting) as X axis, and the avg_hit as Y axis. There should be lines for each ocrtool.

But when I draw a plot, the resulting plot always contains bars, even if I specify type="n".
> plot(data$filter_setting, data$avg.hit., type="n")

When I only plot the categories, without data, there appear strange grey (but empty) boxes.
> plot(data$filter_setting, type="n")

Warning messages:
1: Grafikparameter "type" ist veraltet in: plot.window(xlim, ylim, log, asp, ..)
2: Grafikparameter "type" ist veraltet in: axis(side, at, as.graphicsAnnot(labels), tick, line, pos, outer, 3: Grafikparameter "type" ist veraltet in: title(main, sub, xlab, ylab, line, outer, ...)
4: Grafikparameter "type" ist veraltet in: axis(side, at, as.graphicsAnnot(labels), tick, line, pos, outer,

Who do I get a clean white box to draw the different lines in?

Thanks and regards,
 Christoph



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. Received on Sat 30 Jun 2007 - 12:02:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 01 Jul 2007 - 10:32:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.