Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
c5e8eb76
Commit
c5e8eb76
authored
8 years ago
by
Lukas Stadler
Browse files
Options
Downloads
Patches
Plain Diff
make VectorPrinter more resilient to "null" values
parent
957534be
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/VectorPrinter.java
+5
-5
5 additions, 5 deletions
...e/truffle/r/nodes/builtin/base/printer/VectorPrinter.java
with
5 additions
and
5 deletions
com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/VectorPrinter.java
+
5
−
5
View file @
c5e8eb76
...
...
@@ -330,7 +330,7 @@ abstract class VectorPrinter<T extends RAbstractVector> extends AbstractValuePri
w
[
j
]
=
formatVector
(
0
,
0
);
}
if
(
cl
!=
null
)
{
if
(
cl
!=
null
&&
cl
.
getDataAt
(
j
)
!=
null
)
{
String
clj
=
cl
.
getDataAt
(
j
);
if
(
RRuntime
.
isNA
(
clj
))
{
clabw
=
pp
.
getNaWidthNoquote
();
...
...
@@ -413,7 +413,7 @@ abstract class VectorPrinter<T extends RAbstractVector> extends AbstractValuePri
private
void
matrixColumnLabel
(
RAbstractStringVector
cl
,
int
j
,
int
w
)
{
PrintParameters
pp
=
printCtx
.
parameters
();
if
(
cl
!=
null
)
{
if
(
cl
!=
null
&&
cl
.
getDataAt
(
j
)
!=
null
)
{
String
tmp
=
cl
.
getDataAt
(
j
);
int
l
=
(
RRuntime
.
isNA
(
tmp
))
?
pp
.
getNaWidthNoquote
()
:
tmp
.
length
();
int
gap
=
w
-
l
;
...
...
@@ -433,7 +433,7 @@ abstract class VectorPrinter<T extends RAbstractVector> extends AbstractValuePri
protected
void
rightMatrixColumnLabel
(
RAbstractStringVector
cl
,
int
j
,
int
w
)
{
PrintParameters
pp
=
printCtx
.
parameters
();
if
(
cl
!=
null
)
{
if
(
cl
!=
null
&&
cl
.
getDataAt
(
j
)
!=
null
)
{
String
tmp
=
cl
.
getDataAt
(
j
);
int
l
=
(
RRuntime
.
isNA
(
tmp
))
?
pp
.
getNaWidthNoquote
()
:
tmp
.
length
();
/*
...
...
@@ -458,7 +458,7 @@ abstract class VectorPrinter<T extends RAbstractVector> extends AbstractValuePri
protected
void
leftMatrixColumnLabel
(
RAbstractStringVector
cl
,
int
j
,
int
w
)
{
PrintParameters
pp
=
printCtx
.
parameters
();
if
(
cl
!=
null
)
{
if
(
cl
!=
null
&&
cl
.
getDataAt
(
j
)
!=
null
)
{
String
tmp
=
cl
.
getDataAt
(
j
);
int
l
=
(
RRuntime
.
isNA
(
tmp
))
?
pp
.
getNaWidthNoquote
()
:
tmp
.
length
();
String
g1
=
asBlankArg
(
pp
.
getGap
());
...
...
@@ -480,7 +480,7 @@ abstract class VectorPrinter<T extends RAbstractVector> extends AbstractValuePri
protected
void
matrixRowLabel
(
RAbstractStringVector
rl
,
int
i
,
int
rlabw
,
int
lbloff
)
{
PrintParameters
pp
=
printCtx
.
parameters
();
if
(
rl
!=
null
)
{
if
(
rl
!=
null
&&
rl
.
getDataAt
(
i
)
!=
null
)
{
String
tmp
=
rl
.
getDataAt
(
i
);
int
l
=
(
RRuntime
.
isNA
(
tmp
))
?
pp
.
getNaWidthNoquote
()
:
tmp
.
length
();
String
gap
=
asBlankArg
(
rlabw
-
l
-
lbloff
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment