Here’s a supported way to do this operation.

 — John

julia> using DataArrays

julia> a=@data([NA,3,5,7,NA,3,7])
7-element DataArray{Int64,1}:
  NA
 3  
 5  
 7  
  NA
 3  
 7  

julia> b = copy(a)
7-element DataArray{Int64,1}:
  NA
 3  
 5  
 7  
  NA
 3  
 7  

julia> pop!(b)
7

julia> unshift!(b, NA)
NA

julia> b
7-element DataArray{Int64,1}:
  NA
  NA
 3  
 5  
 7  
  NA
 3  

On Sep 23, 2014, at 6:11 PM, Li Zhang <[email protected]> wrote:

> 
> 
> a=@data([NA,3,5,7,NA,3,7])
> i want to do this:
> b=[NA,a[1:end-1]]
> 
> but julia says no convert methods.
> 
> is there anyone know some other ways?

Reply via email to