similar to: How write the same number of elements in the first line as the rest of the file with write.table()?

Displaying 20 results from an estimated 30000 matches similar to: "How write the same number of elements in the first line as the rest of the file with write.table()?"

2009 Sep 22
1
Weird read.table error? (line `n' did not have `m' elements)
Hi, I have the following commands. It says line 5205 does not have 22 elements. But I use my 'vim' checked that line in the file. It has 22 fields. Can somebody let me know how to further debug this case? Regards, Peng > annotation = read.table("../EC_results/Juan_15wks_gene_core.xls", header=T, sep='\t',quote='') Error in scan(file, what, nmax, sep, dec,
2011 Dec 18
2
write.xls dont find the object in function
Hi, I try to use write.xls from dataframes2xls inside a function. The write.xls work normally in console, but inside a function it dont find the object. Look this example: > library(dataframes2xls) > test <- function(x){ + a <- data.frame(A=c(1,2),B=c(10,11)) + write.xls(a,file="a.xls") + } > test() Erro em get(s[i]) : objeto 'a' não encontrado Why the
2006 May 18
1
write.csv + appending output (FILE I/O)
Hi, How can I write the output to an excel (csv) file without printing row names (i.e without breaks). Here is my code: library( fn <- function() { q <- c(1,2,3) write.csv(q,"C:/Temp/op.xls", append = TRUE, row.names = FALSE,quote = FALSE) } # Function Call for(i in 1:3) { fn() } Present Output : x 1 2 3 x 1 2
2011 Sep 07
1
Werid things when write.table
Hello, I am having some issues with the order write.table. The fact is that I need to use "," as the decimal character and not "." as default, and when I use: write.table(Sales,file="Sales.xls",quote=FALSE, sep = "\t", dec = ",", row.names = FALSE, col.names = TRUE) It does it perfectly, but then, in a different part of the code:
2003 Sep 23
1
smbclient write default to stderr?
Hi I have problem with smbclient in samba3 rc2, rc4. When I start tar backup with it: smbclient //comp-32/volume pass -U user -d0 -Tc /dev/tape0 > /dev/null [2003/09/23 08:27:46, 0] client/clitar.c:do_tar(830) directory \Kart-32\ [2003/09/23 08:27:46, 0] client/clitar.c:do_tar(830) directory \Kart-32\mairs\ [2003/09/23 08:27:46, 0]
2012 May 13
4
write data using xlsReadWrite
Hai, I'm trying to write these var output data from these codes inside excel file. My directory to store the data is /D:\FYP\image / but receive an error message : /Error in write.xls(mydata, "D:\\FYP\\image.mydata.xls") : object 'mydata' not found/ these are my codes, can you help give an advice or idea with my problem: /library("biOps")
2007 Feb 09
1
newline with cell of Excel worksheet created with write.xls
As part of my project to put different types of results into worksheets, I would like to be able to put an auto-generated methods section. If I compose in RWinEdt, read into R, and use write.table with a .txt file extension, what I get out has line-breaks that correspond to those I put in in the first place. If I do the same thing but write.xls with .xls extention, I get an Excel worksheet
2007 Feb 09
1
append within worksheet in write.xls
I can currently append an entire worksheet with write.xls, but would also like to be able to append within the same worksheet. Is this possible? It doesn't seem to work if I use append = T Thanks, Mark -- Mark W. Kimpel MD Neuroinformatics Department of Psychiatry Indiana University School of Medicine
2005 Oct 31
1
write.table call
Hi, I use write.table() to write a file to an external xls file. the column names left-shift one position in output file. I check with col.names() row.names(), the file is fine. How to prevent the shifting? I71 I111 I304 I307 I305 I306 I114 I72 AFFX-BioB-5_at 6.66435 6.787807 5.335962 5.250163 6.47423 5.882104 5.965109 6.591687195 AFFX-BioB-M_at 6.163227 5.965427 4.665569 2.743531 6.097244
2020 Aug 24
2
smbclient mask command seems not to work the same way with recurse ON for mget and mput
Dear fellows. Another piece of information. The issue reprduces on RHEL 7.7, Samba 4.9.1 [root at vnhprerhds01 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.7 (Maipo) [root at vnhprerhds01 ~]# smbclient -V Version 4.9.1 [root at vnhprerhds01 ~]# smbclient -W "${d}" -U "${u}" "${s}" "${p}" Try "help" to get a list of
2009 Sep 15
1
coefficients of aov results has less number of elements?
Hi, I run the following commands. 'A' has 3 levels and 'B' has 4 levels. Should there be totally 3+4 = 7 coefficients (A1, A2, A3, B1, B2, B3, B4)? > a=3 > b=4 > n=1000 > A = rep(sapply(1:a,function(x){rep(x,n)}),b) > B = as.vector(sapply(sapply(1:b, function(x){rep(x,n)}), function(x){rep(x,a)})) > Y = A + B + rnorm(a*b*n) > > fr =
2009 Sep 06
2
How to pop up the graphics window from Rscript?
Hi, I am wondering how to pop up the graphics window from Rscript. I run the following code, but I don't see the graphics window, even transiently. Regards, Peng $ Rscript plot.R > x=1:10 > y=1:10 > plot(x,y) >
2011 Nov 30
1
Replace columns in a data.frame randomly splitted
Dear community, I'm working with the data.frame attached ( http://r.789695.n4.nabble.com/file/n4122926/df1.xls df1.xls ), let's call it df1. I typed: df1<- read.xls("C:/... dir .../df1.xls",colNames= TRUE, rowNames= TRUE) Then I splited randomly df1 using splitdf function (http://gettinggeneticsdone.blogspot.com/2011/03/splitting- dataset-revisited-keeping.html)
2013 Feb 04
2
Wide character in print?
Hello: I get "Wide character in print" from trying read.xls("22_data.xls") in the gdata package, with "22_data.xls" downloaded from "Varieties_Country_A-E.xls" at "http://www.reinhartandrogoff.com/data/browse-by-topic/topics/7/": > library(gdata) > read.xls("22_data.xls") Wide character in print at
2009 Dec 20
2
read.table: mysterious line omissions
Hello again, I am simply trying to import a rectangular table of strings. The table's dimensions are 1990 x 2, yet my read.table() command can only find 362 of the rows (and they're not the first 362). I would've taken the time to figure out how to use scan, readLines, or some other tool that can read in character strings, and then parse and input to a table, but that seems like
2009 Mar 12
1
read.xls and name of worksheet
Hi, I would like to some excel files with some worksheets. I tried this with the following R script: library(gdata) i<-1 rc<-0 while(rc != "try-error") { wksh<-try(read.xls("cluster-microarray-FW.xls",sheet=i,verbose=TRUE,perl="perl")) rc<-class(wksh) print(sprintf("------- i=%2d rc=%s ---------------",i,rc)) if (rc !=
2012 May 20
4
write.xls
Hello, All: The "writeFindFn2xls" function in the "sos" package tries to write an Excel file with 3 sheets ('PackageSum2', 'findFn', 'call'). Unfortunately, it is often unable to do this because of configuration problems that are not easy to fix. I've found 3 contributed packages that provide facilities to write Excel files with
2011 Aug 24
3
Importing data from MS EXCEL (.xls) to R XXXX
Hello everyone, What is the simplest, most RELIABLE way to import data from MS EXCEL (.xls) format to R? In the past I have used the read.xls() function from the xlsReadWrite package, however, I have been wrestling with it all afternoon long with no success. I continue to receive the following error message: > {widge<-read.xls("F:\\Classes\\Z1.Data\\stat.3010\\WidgeOne.xls", +
2012 Mar 15
2
Importing multiple worksheets from one Excle/ csv file into R
Dear R experts, I am trying to import some data from some Excle files into R. My Excle file contains about 50 sheets. One solution I can think about is to convert my Excle file into csv file first and then load data into R using 'read.csv'. But it seems to me that 'read.csv' only supports reading one sheet (or 'one file') each time, so that seems I have to create 50 csv
2010 Jan 01
5
How to not to terminate read.table if the input file is empty?
read.table terminates the program if the input file is empty. Is there way to let the program continue and return me a NULL instead of terminating the program? $ Rscript read_empty.R > read.table("empty_data.txt") Error in read.table("empty_data.txt") : no lines available in input Execution halted $ cat read_empty.R read.table("empty_data.txt") $ cat