ok, I have problems with write function> FId_TrT1 Id_Geno Id_Rep Val_O 3 0 55094 1 85 9 0 55096 1 87 15 0 55098 1 92 21 0 55079 1 76 27 0 55095 1 92 33 0 55099 1 98 39 0 55092 1 92 45 0 55090 1 72 51 0 55101 1 93 57 0 55106 1 90 and to write F I obtain like this:> write(F, "", sep=" ")Erreur dans cat(list(...), file, sep, fill, labels, append) : argument 1 (type 'list') pas encore traité par cat I know that the problem it's that f is a list but when I change it in matrix or something else the consol display it but badly I obtain just one column ___________________________________________________________________________ [[alternative HTML version deleted]]
Hallo, just try it like a data frame, as I mailed you last time. Here an example: dat <- data.frame(Class=I("Id_TrT1"), Levels=I("1"), Values=I("2")) new.info <- c(Class="Id_Geno", Levels="7" , Values="64208 64209 64210 64211 64212 64213 64214") dat <- rbind(dat, new.info) dat new.info <- c(Class=" Id_Rep ", Levels="2" , Values="12") dat <- rbind(dat, new.info) dat Just hack it in the console and look at the output. you can change it for your now needs. CU, Corinna -------- Original-Nachricht -------- Datum: Tue, 24 Apr 2007 13:21:05 +0000 (GMT) Von: elyakhlifi mustapha <elyakhlifi_mustapha at yahoo.fr> An: R-help at stat.math.ethz.ch Betreff: [R] write> ok, > I have problems with write function > > > F > Id_TrT1 Id_Geno Id_Rep Val_O > 3 0 55094 1 85 > 9 0 55096 1 87 > 15 0 55098 1 92 > 21 0 55079 1 76 > 27 0 55095 1 92 > 33 0 55099 1 98 > 39 0 55092 1 92 > 45 0 55090 1 72 > 51 0 55101 1 93 > 57 0 55106 1 90 > > and to write F I obtain like this: > > > write(F, "", sep=" ") > Erreur dans cat(list(...), file, sep, fill, labels, append) : > argument 1 (type 'list') pas encore trait? par cat > > > I know that the problem it's that f is a list but when I change it in > matrix or something else the consol display it but badly > I obtain just one column > > > > ___________________________________________________________________________ > > > > > > [[alternative HTML version deleted]] >-- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Hi had you consider to look at help page? How do you expect your written file to be named?>From help pagewrite is a wrapper for cat, which gives further details on the format used cat is useful for producing output in user-defined functions. It converts its arguments to character strings, concatenates them, separating them by the given sep= string, and then outputs them save for writing any R objects, write.table for data frames, and scan for reading data ^^^^^^^^^^^^^^^^^^^^^^^^^^ write.table(F, "some.file.name", sep= "\t") can maybe do what you want. Help provided with your installation is probably the quickiest way how to evaluate things about commands without waiting for usually delayed and sometimes ironical answer. Regards Petr BTW, F can state for FALSE so if you stick with such names you can be somtimes quite confused however smart is R in evaluating functions and objects. r-help-bounces at stat.math.ethz.ch napsal dne 24.04.2007 15:21:05:> ok, > I have problems with write function > > > F > Id_TrT1 Id_Geno Id_Rep Val_O > 3 0 55094 1 85 > 9 0 55096 1 87 > 15 0 55098 1 92 > 21 0 55079 1 76 > 27 0 55095 1 92 > 33 0 55099 1 98 > 39 0 55092 1 92 > 45 0 55090 1 72 > 51 0 55101 1 93 > 57 0 55106 1 90 > > and to write F I obtain like this: > > > write(F, "", sep=" ") > Erreur dans cat(list(...), file, sep, fill, labels, append) : > argument 1 (type 'list') pas encore trait? par cat > > > I know that the problem it's that f is a list but when I change it inmatrix> or something else the consol display it but badly > I obtain just one column > > > >___________________________________________________________________________> > > > > > [[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 guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.