Skip to content

Commit

Permalink
closes #15 xlxs dependency removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Heckmann authored and Mark Heckmann committed Sep 6, 2014
1 parent ed3251f commit a809180
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ http://www.r-bloggers.com/quickly-read-excel-xlsx-worksheets-into-r-on-any-platf
OpenRepGrid 0.1.9 (opened 2013-06-13) ----------------------------------------
* align parameter added to cluster
* importTxt will now erase empty lines
* changed default settings for discrepancies for implicative dilemmas to 4
* dependency on xlsx removed (issue #15)


OpenRepGrid 0.1.8 (2013-06-13) ----------------------------------------
Expand Down
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Package: OpenRepGrid
Maintainer: Mark Heckmann <heckmann@uni-bremen.de>
License: GPL (>= 2)
Title: Tools to analyse repertory grid data
LazyData: yes
Type: Package
LazyLoad: yes
Author: Mark Heckmann
Authors@R: person("Heckmann", "Mark", email = "heckmann@uni-bremen.de",
role = c("aut", "cre"))
Description: Tools to analyse repertory grid data
Version: 0.1.9
Date: 2013-06-13
Date: 2014-09-06
Depends:
methods,
grid,
Expand All @@ -21,8 +21,9 @@ Depends:
psych,
XML,
tcltk,
xlsx,
pvclust
Suggest:
xlxs
Collate:
'data-openrepgrid.r'
'repgrid.r'
Expand Down
8 changes: 4 additions & 4 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
For a technical overview on changes see file CHANGELOG in source.


============================

OPENREPGRID RELEASE VERSIONS
============================

Version 0.1.9 (opened June 13, 2013) --------------------------


Version 0.1.9 (released September 06, 2014) --------------------------
* internal changes only

Version 0.1.8 (released June 13, 2013) --------------------------
* importGridstat can now import multigrid files
Expand Down
10 changes: 9 additions & 1 deletion R/import.r
Original file line number Diff line number Diff line change
Expand Up @@ -1660,13 +1660,21 @@ importExcelInternal <- function(file, dir=NULL, sheetIndex=1,
#'
importExcel <- function(file, dir=NULL, sheetIndex=1, min=NULL, max=NULL)
{
if (!require(xlsx))
stop("\n---------------------------------------------------------------------------\n",
" This functions requires the xlsx package to be installed.\n",
" xlsx in turn requires the Java Runtime Environment (JRE) on your system.\n",
" Install the JRE and the xlsx package if you want to use this feature.\n",
"---------------------------------------------------------------------------",
call. = FALSE)

if (missing(file)){ # open file selection menu if no file argument is supplied
Filters <- matrix(c("excel", ".xlsx",
"excel", ".xls"),
ncol=2, byrow = TRUE)
file <- tk_choose.files(filters = Filters, multi=TRUE) # returns complete path
}
imps <- lapply(as.list(file), importExcelInternal, # make import objects for each .txt file
imps <- lapply(as.list(file), importExcelInternal, # make import objects for each .txt file
dir=dir, sheetIndex=sheetIndex,
min=min, max=max)
rgs <- lapply(imps, convertImportObjectToRepGridObject) # make repgrid object from import object
Expand Down

0 comments on commit a809180

Please sign in to comment.