ApplyToRows - Maple Help

Online Help

All Products    Maple    MapleSim


DataSets[Builtin][Reference]

  

ApplyToRows

  

create a Matrix of transformed data with algebraic expressions

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

ApplyToRows(ref, aexp1, aexp2, ..., aexpN)

Parameters

ref

-

reference to built-in data

aexp1, aexp2, ..., aexpN

-

algebraic expressions where the indeterminants are column names of ref as Maple names

Description

• 

The ApplyToRows command creates Matrix of transformed data.

• 

The number of columns is equal to the number of algebraic expressions. The number of rows is equal to the number of rows in ref.

• 

The value of the i,j-th entry is the j-th algebraic expression evaluated with the column names substituted for the values in those columns in the i-th row of ref.

• 

Time series data in the reference object are treated as their newest value when using this command.

Examples

withDataSets:

refReferenceBuiltin,CountryCanada,USA,CO2 Emissions,Population

refCountry (Name)CO2 EmissionsPopulationCanadaTimeSeries 537193.498TimeSeries 39.23USATimeSeries 5254279.285TimeSeries 340.976

(1)

Find the CO2 emission per person in Canada or the USA

ApplyToRowsrefCanada,USA,`CO2 Emissions`1000000Population

0.013693436090.01540952819

(2)

To also have the absolute CO2 emissions in the first column

ApplyToRowsrefCanada,USA,`CO2 Emissions`,`CO2 Emissions`Population

537193.49813693.436095.254279285×10615409.52819

(3)

Compatibility

• 

The DataSets[Builtin][Reference][ApplyToRows] command was introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

DataSets