Labels - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


DataSeries/Labels

obtain labels of a DataSeries

DataSeries/SubsLabel

create a DataSeries with a different label

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Labels(DS)

Labels(DS, i)

SubsLabel(DS, i, label)

Parameters

DS

-

a DataSeries object

i

-

a nonzero integer or valid label

label

-

a new label

Description

• 

The Labels command returns the list of labels for a DataSeries object, or a single label. A single label is specified by its position.

• 

The SubsLabel command creates a DataSeries object with a different label. Note: this does not modify the given DataSeries object DS - it just returns a new DataSeries object. See the Examples section below.

• 

If i is negative, it specifies the position counting from the end. For example, -2 specifies the label before last.

Examples

> 

ds≔DataSeries⁡5,6,8,labels=a,b,c

ds≔a5b6c8

(1)
> 

Labels⁡ds

a,b,c

(2)
> 

Labels⁡ds,2

b

(3)

The statement below does not modify ds.

> 

ds2≔SubsLabel⁡ds,1,z

ds2≔z5b6c8

(4)
> 

Labels⁡ds

a,b,c

(5)
> 

Labels⁡ds2

z,b,c

(6)

We can make the change apply to ds by assigning the result to ds.

> 

ds≔SubsLabel⁡ds,−1,y

ds≔a5b6y8

(7)
> 

Labels⁡ds

a,b,y

(8)
> 

SubsLabel⁡ds,b,x

a5x6y8

(9)

Compatibility

• 

The DataSeries/Labels and DataSeries/SubsLabel commands were introduced in Maple 2016.

• 

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

See Also

DataFrame/Labels

DataSeries

DataSeries/Constructor

DataSeries/indexing