r-xlsx

write.xlsx function not working

折月煮酒 提交于 2019-12-05 02:54:31
问题 I am trying to use .xlsx library but function write.xlsx is returning error that such can not be found. When I am installing library(xlsx) in log I can read: Error : .onLoad nie powiodło się w funkcji 'loadNamespace()' dla pakietu 'rJava', szczegóły: wywołanie: fun(libname, pkgname) błąd: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures. In addition: Warning messages: 1: pakiet ‘xlsx’ został zbudowany w wersji R

Timestamp changes when writing a R dataframe to an excel file depending upon UTC offset

你离开我真会死。 提交于 2019-12-04 18:39:12
I am trying to write a data frame into an excel file. The sample dataframe is as given below. As the timestamp is of class factor , I convert it into POSIXct format using the lubridate package. library(lubridate) library(xlsx) df=structure(list(ts = structure(c(5L, 8L, 9L, 1L, 6L, 7L, 4L, 2L, 3L), .Label = c("01.09.2016 10:56:56", "01.09.2016 11:04:37", "01.09.2016 12:03:59", "02.09.2016 08:47:01", "30.08.2016 08:27:28", "30.08.2016 16:08:56", "31.08.2016 07:38:43", "31.08.2016 10:26:53", "31.08.2016 10:37:40"), class = "factor")), .Names = "ts", row.names = c(NA,-9L), class = "data.frame") df

write.xlsx function not working

点点圈 提交于 2019-12-03 17:09:27
I am trying to use .xlsx library but function write.xlsx is returning error that such can not be found. When I am installing library(xlsx) in log I can read: Error : .onLoad nie powiodło się w funkcji 'loadNamespace()' dla pakietu 'rJava', szczegóły: wywołanie: fun(libname, pkgname) błąd: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures. In addition: Warning messages: 1: pakiet ‘xlsx’ został zbudowany w wersji R 3.3.2 2: pakiet ‘rJava’ został zbudowany w wersji R 3.3.3 Error: pakiet ‘rJava’ nie mógł zostać

Formatting an entire excel workbook efficiently using the R xlsx package

∥☆過路亽.° 提交于 2019-12-01 02:15:28
Novice here on Stack Overflow so please bear with me - any help or advice gratefully appreciated! I am trying to apply a single cell style to entire Excel workbooks that I have created using the write.xlsx function in R. I have looked online and the best I could come up with was the following approach. Reformat<-function(filename){ wb<-loadWorkbook(filename) sheets<-getSheets(wb) for (sheet in sheets){ rows<-getRows(sheet) cells<-getCells(rows) cs <- CellStyle(wb) + Font(wb, heightInPoints=12,name="Calibri") + DataFormat("#,##0") + Alignment(h="ALIGN_CENTER") invisible(lapply(c(1:length(cells)

Formatting an entire excel workbook efficiently using the R xlsx package

孤者浪人 提交于 2019-11-30 20:44:18
问题 Novice here on Stack Overflow so please bear with me - any help or advice gratefully appreciated! I am trying to apply a single cell style to entire Excel workbooks that I have created using the write.xlsx function in R. I have looked online and the best I could come up with was the following approach. Reformat<-function(filename){ wb<-loadWorkbook(filename) sheets<-getSheets(wb) for (sheet in sheets){ rows<-getRows(sheet) cells<-getCells(rows) cs <- CellStyle(wb) + Font(wb, heightInPoints=12

Problems when trying to load a package in R due to rJava

只愿长相守 提交于 2019-11-26 22:17:38
When I type require(xlsx) in order to load the package xlsx in R, the following messages is shown: > require(xlsx) Loading required package: xlsx Loading required package: xlsxjars Loading required package: rJava Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry Failed with error: ‘package ‘rJava’ could not be loaded’ I've also tried to load the rJava package manually but got this error message: require(rJava) Loading required package: rJava Error : .onLoad failed in loadNamespace() for 'rJava',

Problems when trying to load a package in R due to rJava

无人久伴 提交于 2019-11-26 06:37:35
问题 When I type require(xlsx) in order to load the package xlsx in R, the following messages is shown: > require(xlsx) Loading required package: xlsx Loading required package: xlsxjars Loading required package: rJava Error : .onLoad failed in loadNamespace() for \'rJava\', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry Failed with error: ‘package ‘rJava’ could not be loaded’ I\'ve also tried to load the rJava package manually but got this error