help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dataframe construction question


From: CdeMills
Subject: Re: dataframe construction question
Date: Mon, 8 Sep 2014 08:44:06 -0700 (PDT)

shlagbaum wrote
> Why the following works:
> 
> octave:17> RHS={'a','b','c';double(1),'e','f'};
> octave:18> x=dataframe([]);
> FIXME -- should create a dataframe from the whole workspace
> octave:19> x(:,:)=RHS
> x = dataframe with 1 rows and 3 columns
> _1      a    b    c                    
> Nr double char char                    
>  1      1    e    f                    
> 
> but the following does not?
> 
> octave:20> RHS={'a','b','c';'d','e','f'};
> octave:21> x=dataframe([]);
> FIXME -- should create a dataframe from the whole workspace
> octave:22> x(:,:)=RHS
> error: df_matassign: A(I,J): row index out of bounds; value 1 out of bound
> 0
> error: called from:
> error:  
> /home/slava/octave/dataframe-1.0.0/@dataframe/private/df_matassign.m at
> line 186, column 15
> error:   /home/slava/octave/dataframe-1.0.0/@dataframe/subsasgn.m at line
> 213, column 10
> error: assignment failed, or no method for 'class = cell'

Hello, 
I am the author of the dataframe package.

The idea about using the RHS method is to consider that the two first  lines
are maybe special:
- first one may contain column names
- second may contain columns types (char, int, ...)

So, after having extracted the two first lines because all content are
strings, the procedure goes further in the analysis ... on an empty cell
array. I'm looking at that and will put out a new version shortly.

Regards

Pascal Dupuis



--
View this message in context: 
http://octave.1599824.n4.nabble.com/dataframe-construction-question-tp4666408p4666418.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]