As a consequence of renaming Stats to StatsBase, I’ve had to update DataFrames 
and DataArrays.

This means that everyone working with those libraries is now in sync with 
master again. That brings with it a lot of changes that may break some code.

To help minimize breakage, here are the most obvious changes that might affect 
you.

(1) We now offer @data / @pdata macros to write out literal DataArrays and 
PooledDataArrays. They need a little bit more refinement to deal with edge 
cases, but they’re a big improvement over the previous system. Examples of 
usage below:

@data [1, 2, NA, 4]
@data [1 2; NA 4]

@pdata [1, 2, NA, 4]
@pdata [1 2; NA 4]

You can also do this with variables (as long as they’re not NA’s):

a, b, c, d = 1, 2, 3, 4
@data [a, b, c, d]
@data [a b; c d]

The unfortunate edge case is that the following will fail:

a, b, c, d = 1, 2, 3, NA
@data [a, b, c, d]
@data [a b; c d]

(2) To convert other AbstractArrays to DataArrays / DataFrames, please use the 
data and pdata functions:

data([1, 2, 3, 4])
data(1:3)

pdata([1, 2, 3, 4])
pdata(1:3)

We’ve removed a lot of the constructors for DataArrays and PooledDataArray’s 
that had no parallel to anything in Base, where there are very few valid 
constructors for Array’s. If you use things like DataArray(1:10), it will be 
broken now. Please switch to using the data() function.

 — John

Reply via email to