data.frame and import to xlsx

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

data.frame and import to xlsx

sisi26
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  
Reply | Threaded
Open this post in threaded view
|

Re: data.frame and import to xlsx

Rui Barradas
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.
>
> ______________________________________________
> [hidden email] 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.
>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: data.frame and import to xlsx

Rui Barradas
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 <[hidden email]>
> À : sisi26 <[hidden email]>
> Cc : [hidden email]
> 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.
>>
>> ______________________________________________
>> [hidden email] 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.
>>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: data.frame and import to xlsx

jholtman
In reply to this post by sisi26
If you are going to use XLConnect to read in the .xlsx files, I would
suggest that you might want to convert them to .xls files.  Run a
performance test to see if you have a problem.  I use a lot of EXCEL
files and have found that the performance (in both time and memory) is
much better with .xls files.

On Sat, Feb 23, 2013 at 5:14 PM, sisi26 <[hidden email]> wrote:

> 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.
>
> ______________________________________________
> [hidden email] 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.



--
Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.

______________________________________________
[hidden email] 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.