[R] data.frame and import to xlsx
Rui Barradas
ruipbarradas at sapo.pt
Sun Feb 24 19:00:03 CET 2013
Hello,
Please keep the discussion on the list, the odds of you getting more and
better answers is greater. (I'm Cceing to R-Help.)
What package is read_spectra in?
What type of object does it return? Can you post the result of the
following instruction?
str(SP) # paste the output of this.
If it's a data.frame then package XLConnect can do the job. The
following code is the example in ?XLConnect::saveWorkbook adapted to a
file named etch1.xlsx and to a dataset named SP.
#install.packages('XLConnect') # do this only once
library(XLConnect) # load it in the R session
# Create a new workbook 'etch1.xlsx'
# (assuming the file does not exist already)
wb <- loadWorkbook("etch1.xlsx", create = TRUE)
# Create a worksheet called 'SP'
createSheet(wb, name = "SP")
# Write dataset SP to sheet 'SP' created above
writeWorksheet(wb, SP, sheet = "SP")
# Save workbook - this actually writes the file 'etch1.xlsx' to disk
saveWorkbook(wb)
Hope this helps,
Rui Barradas
Em 24-02-2013 17:42, Sihem Ben Zakour escreveu:
> I have a data,
>
> you can read them with this function
>
>
> SP <-
> read_spectra("path/etch1.svd")
> but i want to open them on xlsx
>
> The WL is the name variables (from 200......)
>
> t is the time,
>
> and SP is the observations on WL(i) and t(j)
>
> please could you help me to convert them on xlsx with this form
> t\WL 200 200.5 ...
> .
>
> .
>
>
> ________________________________
> De : Rui Barradas <ruipbarradas at sapo.pt>
> À : sisi26 <benzakour_s at ymail.com>
> Cc : r-help at r-project.org
> Envoyé le : Dimanche 24 février 2013 13h53
> Objet : Re: [R] data.frame and import to xlsx
>
> Hello,
>
> I'm not sure I understand the question. You want to import an xlxs sheet
> to R? Look at package XLConnect. The vignette explains several ways of
> doing it.
> And as for the frame, the import functions in XLConnect (and the several
> read.* functions in base R) return data.frames so the problem should be
> solved.
>
> Hope this helps,
>
> Rui Barradas
>
> Em 23-02-2013 22:14, sisi26 escreveu:
>> Hi,
>> i have a very huge number of data with the size 2375ko, i want to import
>> them for R to xlsx
>> but the size of excel is limited
>> How can i resolve this problem?
>> And please how can i define the frame
>> Note that i have a table
>> rows times c(1.....100) columns WLc(200...1000) and inside S c(15,.........)
>> the table it is full values
>>
>>
>>
>> --
>> View this message in context: http://r.789695.n4.nabble.com/data-frame-and-import-to-xlsx-tp4659486.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help at r-project.org 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.
>>
More information about the R-help
mailing list