Project

General

Profile

Actions

Bug #4827

open

RExpression does not handle matrix tokens correctly.

Added by Tom Parris about 14 years ago. Updated almost 13 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
actors
Target version:
Start date:
02/23/2010
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
4827

Description

I've attached a simple workflow that demonstrates a bug in the way the RExpression actor translates Kepler/Ptolemy matrices to R matrices. There seems to be a problem in the autmatically generated "matrix" statement in R that is likely due to confusing row and column counts.

A simple 2 row x 5 column constant matrix ([1, 2, 3, 4, 5; 101, 102, 103, 104, 105]) is passed to Rexpression on the min port. The R script simply displays the matrix and passes it along to the mout port.

There are three displays.

1. min displays the matrix before it enters the RExpression actor. It is fine.

2. mout displays the matrix after it leaves the RExpression actor. It too is fine (indicating that the translation problem inverts itself when baorcasting to the output port).

3. The problem is in the Routput display.

min

[,1] [,2] [,3] [,4] [,5]
[1,] 1 3 5 102 104
[2,] 2 4 101 103 105

Note how the matrix is scrambled. The automatically generated R script line that reads:

`min` <- matrix(c(1, 2, 3, 4, 5, 101, 102, 103, 104, 105), nrow=2,ncol=5)

should read

`min` <- matrix(c(1, 101, 2, 102, 3, 103, 4, 104, 5, 105), nrow=2,ncol=5)

Files

R_Matrix_Test.xml (35.8 KB) R_Matrix_Test.xml Tom Parris, 02/23/2010 12:38 PM
Actions #1

Updated by Tom Parris almost 13 years ago

I just re-tested this with the latest trunk. The problem is still there.

Actions #2

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 4827

Actions

Also available in: Atom PDF