[R] question on table format

Martin Maechler
Mon, 19 Mar 2007 13:05:55 -0000

use
	print(<your.character.matrix>,  quote = FALSE)

HTH,
Martin

>>>>> "Norbert" == Norbert NEUWIRTH <norbertneuwirth
at gmx.at>
>>>>>     on Mon, 19 Mar 2007 13:20:57 +0100 writes:

    Norbert> hi everybody,
    Norbert> i am hanging in a problem that should be solved quickly, but, in
fact, i do not get further: building up a SUR/SES-system myself, where the
regressions are finally used to be poisson and/or negative-binomial type, i want
to generate a simple table, where i can quickly see the coefficients and their
markers  for significance.

    Norbert> so i constructed this "final.table" (code & outout
below). as the  markers for significance are character-type, the content of each
cell in the whole table appears as character with quotation marks.these
quotations marks should be suppressed. how can i handle this?

    Norbert> thank you in advance


    Norbert> norbert

    Norbert> ---------------------------
    Norbert> code:

    Norbert> final.table3 <- as.matrix (cbind(
    Norbert> round(coef.sur5.lm[,1],4),sigc.sur5.lm[,1],
    Norbert> round(coef.sur5.lm[,2],4),sigc.sur5.lm[,2],
    Norbert> round(coef.sur5.lm[,3],4),sigc.sur5.lm[,3],
    Norbert> round(coef.sur5.lm[,4],4),sigc.sur5.lm[,4],
    Norbert> round(coef.sur5.lm[,5],4),sigc.sur5.lm[,5]
    Norbert> ))
    Norbert> colnames(final.table3) <- c("MW","sig.",
    Norbert> "HP","sig.",
    Norbert> "CC","sig.",
    Norbert> "AL","sig.",
    Norbert> "RC","sig.")

    Norbert> ---------------------------
    Norbert> output:

    Norbert> MW        sig.  HP        sig.  CC        sig.  AL        sig.
RC        sig.
    Norbert> (Intercept) "6.7757"  "***"
"-2.2851" "***" "-0.067"  ""
"8.517"   "***" "11.0767" "***"
    Norbert> FEMALE      "-1.6267" "***"
"2.4045"  "***" "0.2892"  "***"
"-1.0887" "***" "0.0236"  ""
    Norbert> AGE         "-0.0324" "."
"0.1923"  "***" "0.0158"  "***"
"-0.0984" "***" "-0.0778" "***"
    Norbert> I(AGE^2)    "1e-04"   ""
"-0.0019" "***" "-2e-04"  "***"
"0.0011"  "***" "0.001"   "***"
    Norbert> C2.H        "-0.2589" "*"
"0.2051"  "**"  "0.5289"  "***"
"-0.4537" "***" "-0.0211" ""
    Norbert> C2_3.H      "-0.4278" "**"
"0.118"   ""    "0.4837"  "***"
"-0.1301" ""    "-0.0422" ""
    Norbert> ...		...		...		...		...		...
    Norbert> --
    Norbert> -------------------------------
    Norbert> Mag. Norbert NEUWIRTH

    Norbert> Roubiczekgasse 2/23
    Norbert> A-1100  WIEN
    Norbert> mob: +43 699 1835 0704

    Norbert> ______________________________________________
    Norbert> R-help at stat.math.ethz.ch mailing list
    Norbert> https://stat.ethz.ch/mailman/listinfo/r-help
    Norbert> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
    Norbert> and provide commented, minimal, self-contained, reproducible
code.