Skip to content

Commit 1516d89

Browse files
authored
Add check for empty arrays in listToMatrix (#115)
- note that we have another Rlabkey change coming soon in another PR so will wait for that to publish the updated version
1 parent 21c1058 commit 1516d89

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

Rlabkey/DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: Rlabkey
2-
Version: 3.4.2
3-
Date: 2025-03-12
2+
Version: 3.4.3
3+
Date: 2025-03-21
44
Title: Data Exchange Between R and 'LabKey' Server
55
Authors@R: c(person(given = "Peter",
66
family = "Hussey",

Rlabkey/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Changes in 3.4.3
2+
o Bugfix to labkey.selectRows when group_concat based field has a NULL value. Related to github issue #112
3+
14
Changes in 3.4.2
25
o Add showProgressBar parameter to labkey.webdav.downloadFolder and labkey.webdav.get
36

Rlabkey/src/listToMatrix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ CharacterMatrix listToMatrix(List data, List names) {
3737
{
3838
// only try to parse the first vector element as a string if it is non-null
3939
GenericVector gv = as<GenericVector>((as<List>(data[i]))[as<int>(indexList[j])]);
40-
if(!Rf_isNull(gv[0]))
40+
if(gv.size() > 0 && !Rf_isNull(gv[0]))
4141
{
4242
cMatrix(i,j) = as<CharacterVector>(gv[0])[0];
4343
}

0 commit comments

Comments
 (0)