Skip to content

Commit c046524

Browse files
committed
Many small fixes for new R release
1 parent 477f06c commit c046524

22 files changed

+161
-135
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: excel.link
22
Type: Package
33
Title: Convenient Data Exchange with Microsoft Excel
4-
Version: 0.9.11
4+
Version: 0.9.12
55
Author: Gregory Demin <excel.link.feedback@gmail.com>. To comply CRAN policy
66
includes source code from 'RDCOMClient' (http://www.omegahat.net/RDCOMClient/) by
77
Duncan Temple Lang <duncan@wald.ucdavis.edu>.
@@ -30,4 +30,4 @@ BugReports: https://github.com/gdemin/excel.link/issues
3030
LazyLoad: yes
3131
ByteCompile: TRUE
3232
NeedsCompilation: yes
33-
RoxygenNote: 7.2.3
33+
RoxygenNote: 7.3.0

NAMESPACE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@ S3method(fix_encoding,data.frame)
2323
S3method(fix_encoding,default)
2424
S3method(fix_encoding,list)
2525
S3method(fix_encoding,matrix)
26+
S3method(has.colnames,default)
27+
S3method(has.colnames,excel.range)
28+
S3method(has.rownames,default)
29+
S3method(has.rownames,excel.range)
2630
S3method(sort,excel.range)
31+
S3method(xl.raw.write,POSIXct)
32+
S3method(xl.raw.write,POSIXlt)
33+
S3method(xl.raw.write,default)
34+
S3method(xl.raw.write,matrix)
2735
S3method(xl.sheet.exists,character)
2836
S3method(xl.sheet.exists,numeric)
2937
S3method(xl.write,current.graphics)

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
0.9.12 (16.01.2024)
2+
===============
3+
* minor fix
4+
15
0.9.11 (05.05.2023)
26
===============
37
* update for R4.3

R/dimnames.excel.range.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ has.rownames = function(x){
105105
UseMethod("has.rownames")
106106
}
107107

108+
#' @export
108109
has.colnames.default = function(x)
109110
# get attribute has.colnames
110111
{
@@ -113,6 +114,7 @@ has.colnames.default = function(x)
113114
res
114115
}
115116

117+
#' @export
116118
has.rownames.default = function(x)
117119
# get attribute has.rownames
118120
{
@@ -135,6 +137,7 @@ has.rownames.default = function(x)
135137
x
136138
}
137139

140+
#' @export
138141
has.colnames.excel.range = function(x)
139142
# get attribute has.colnames
140143
{
@@ -143,7 +146,7 @@ has.colnames.excel.range = function(x)
143146
res
144147
}
145148

146-
149+
#' @export
147150
has.rownames.excel.range = function(x)
148151
# get attribute has.rownames
149152
{

R/excel.link.R

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,17 @@
3333
#' \code{xlc[a1] = iris}. After that we connect Excel range with R object:
3434
#' \code{xl_iris = xl.connect.table("a1",row.names = FALSE, col.names =
3535
#' TRUE)}. So we can:
36-
#' \itemize{ \item{get data from this Excel range:}{
37-
#' \code{xl_iris$Species}}
38-
#' \item{add new data to this Excel range: }{
39-
#' \code{xl_iris$new_column = 42}}
40-
#' \item{sort this range: }{
41-
#' \code{sort(xl_iris,column = "Sepal.Length")}}
42-
#' \item{and more...} }
36+
#' \itemize{
37+
#' \item get data from this Excel range: \code{xl_iris$Species}
38+
#' \item add new data to this Excel range: \code{xl_iris$new_column = 42}
39+
#' \item sort this range: \code{sort(xl_iris,column = "Sepal.Length")}
40+
#' \item and more...
41+
#' }
4342
#' Live connection is faster than active binding to range but is less universal
4443
#' (for example, you can't use \code{within} statement with it).
4544
#' @seealso \code{\link{xl}}, \code{\link{current.graphics}},
4645
#' \code{\link{xl.connect.table}}
47-
#' @docType package
48-
#' @name excel.link
49-
NULL
46+
"_PACKAGE"
5047

5148

5249
#' @useDynLib "excel.link",.registration = TRUE

R/xl.connect.table.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@
3232
#' the corresponding extent. Indices can also be negative integers, indicating
3333
#' elements/slices to leave out of the selection.
3434
#'
35-
#' @return \itemize{ \item{\code{xl.connect.table}}{ returns object of
35+
#' @return \itemize{
36+
#' \item \code{xl.connect.table} returns object of
3637
#' \code{excel.range} class which represent data on Excel sheet. This object
3738
#' can be treated similar to data.frame. So you can assign values, delete
38-
#' columns/rows and so on. For more information see examples.}
39-
#' \item{\code{sort}}{ sorts Excel range by single column (multiple columns
40-
#' currently not supported) and invisibly return NULL. }}
39+
#' columns/rows and so on. For more information see examples.
40+
#' \item \code{sort} sorts Excel range by single column (multiple columns
41+
#' currently not supported) and invisibly return NULL.
42+
#' }
4143
#' @examples
4244
#'
4345
#'

R/xl.sheet.add.R

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@
77
#' workbook
88
#'
99
#' @details \itemize{
10-
#' \item{\code{xl.sheet.add}}{ adds new sheet with given name and invisibly
10+
#' \item \code{xl.sheet.add} adds new sheet with given name and invisibly
1111
#' returns name of this newly added sheet. Added sheet become active. If
1212
#' \code{xl.sheet.name} is missing default name will be used. If \code{before}
1313
#' argument is missing, sheet will be added at the last position. If sheet with
14-
#' given name already exists error will be generated.}
15-
#' \item{\code{xl.sheet.name}}{ rename active sheet. If its argument is missing
16-
#' then it just return active sheet name.}
17-
#' \item{\code{xl.sheet.hide}/\code{xl.sheet.show}}{ hide and show sheet by its
14+
#' given name already exists error will be generated.
15+
#' \item \code{xl.sheet.name} rename active sheet. If its argument is missing
16+
#' then it just return active sheet name.
17+
#' \item \code{xl.sheet.hide}/\code{xl.sheet.show} hide and show sheet by its
1818
#' name. \code{xl.sheet.visible} returns current visibility status of the
19-
#' sheet.}
20-
#' \item{\code{xl.sheet.activate}}{ activates sheet with given name/number. If
21-
#' sheet with this name doesn't exist error will be generated.}
22-
#' \item{\code{xl.sheet.delete}}{ deletes sheet with given
23-
#' name/number. If name doesn't submitted it delete active sheet.}
19+
#' sheet.
20+
#' \item \code{xl.sheet.activate} activates sheet with given name/number. If
21+
#' sheet with this name doesn't exist error will be generated.
22+
#' \item \code{xl.sheet.delete} deletes sheet with given
23+
#' name/number. If name doesn't submitted it delete active sheet.
2424
#' }
2525
#'
2626
#' @return
2727
#' \itemize{
28-
#' \item{\code{xl.sheet.add}/\code{xl.sheet.activate}/\code{xl.sheet.duplicate}}{
29-
#' invisibly return name of created/activated/duplicated sheet.}
30-
#' \item{\code{xl.sheets}}{ returns vector of sheet names in active workbook.}
31-
#' \item{\code{xl.sheet.delete}}{ invisibly returns NULL.}
28+
#' \item \code{xl.sheet.add}/\code{xl.sheet.activate}/\code{xl.sheet.duplicate}
29+
#' invisibly return name of created/activated/duplicated sheet.
30+
#' \item \code{xl.sheets} returns vector of sheet names in active workbook.
31+
#' \item \code{xl.sheet.delete} invisibly returns NULL.
3232
#' }
3333
#'
3434
#' @seealso

R/xl.workbooks.R

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,29 @@
1212
#' by default.
1313
#'
1414
#' @return \itemize{
15-
#' \item{\code{xl.workbook.add}/\code{xl.workbook.open}/\code{xl.workbook.activate}
16-
#' }{ invisibly return name of created/open/activated workbook.}
17-
#' \item{\code{xl.workbooks}}{ returns character vector of open workbooks.}
18-
#' \item{\code{xl.workbook.save}}{ invisibly returns path to the saved workbook}
19-
#' \item{\code{xl.workbook.close}}{ invisibly returns NULL.} }
20-
#' @details \itemize{ \item{\code{xl.workbook.add}}{ adds new workbook and
15+
#' \item \code{xl.workbook.add}/\code{xl.workbook.open}/\code{xl.workbook.activate}
16+
#' invisibly return name of created/open/activated workbook.
17+
#' \item \code{xl.workbooks} returns character vector of open workbooks.
18+
#' \item \code{xl.workbook.save} invisibly returns path to the saved workbook.
19+
#' \item \code{xl.workbook.close} invisibly returns NULL.
20+
#' }
21+
#' @details \itemize{
22+
#' \item \code{xl.workbook.add} adds new workbook and
2123
#' invisibly returns name of this newly created workbook. Added workbook become
2224
#' active. If \code{filename} argument is provided then Excel workbook
23-
#' \code{filename} will be used as template.}
24-
#' \item{\code{xl.workbook.activate}}{ activates workbook with given name. If
25-
#' workbook with this name doesn't exist error will be generated.}
26-
#' \item{\code{xl.workbook.save}}{ saves active workbook. If only
25+
#' \code{filename} will be used as template.
26+
#' \item \code{xl.workbook.activate} activates workbook with given name. If
27+
#' workbook with this name doesn't exist error will be generated.
28+
#' \item \code{xl.workbook.save} saves active workbook. If only
2729
#' \code{filename} submitted it saves in the working directory. If name of
2830
#' workbook is omitted than new workbook is saved under its default name in the
2931
#' current working directory. It doesn't prompt about overwriting if file
30-
#' already exists.} \item{\code{xl.workbook.close}}{ closes workbook with given
32+
#' already exists.
33+
#' \item \code{xl.workbook.close} closes workbook with given
3134
#' name. If name isn't submitted it closed active workbook. It doesn't prompt
3235
#' about saving so if you don't save changes before closing all changes will be
33-
#' lost.} }
34-
#'
36+
#' lost.
37+
#' }
3538
#' @seealso \code{\link{xl.sheets}}, \code{\link{xl.read.file}},
3639
#' \code{\link{xl.save.file}}
3740
#' @examples

R/xl.write.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ xl.raw.write = function(r.obj,xl.rng,na = ""){
370370
}
371371

372372

373-
373+
#' @export
374374
xl.raw.write.default = function(r.obj,xl.rng,na = "")
375375
### writes vectors (one-dimensional objects)
376376
{
@@ -395,14 +395,17 @@ xl.raw.write.default = function(r.obj,xl.rng,na = "")
395395
invisible(c(length(r.obj),1))
396396
}
397397

398+
#' @export
398399
xl.raw.write.POSIXct = function(r.obj,xl.rng,na = ""){
399400
xl.raw.write(format(r.obj, usetz = FALSE),xl.rng,na)
400401
}
401402

403+
#' @export
402404
xl.raw.write.POSIXlt = function(r.obj,xl.rng,na = ""){
403405
xl.raw.write(format(r.obj, usetz = FALSE),xl.rng,na)
404406
}
405407

408+
#' @export
406409
xl.raw.write.matrix = function(r.obj,xl.rng,na = "")
407410
### insert matrix into excel sheet without column and row names
408411
{

man/excel.link.Rd renamed to man/excel.link-package.Rd

Lines changed: 58 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)