Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow PooledDataVector construction using a given pool. #52

Merged
merged 2 commits into from
Aug 13, 2012

Conversation

doobwa
Copy link
Contributor

@doobwa doobwa commented Aug 12, 2012

In R it's useful to be able to provide a predetermined pool, e.g. x <- factor(1, 1:10) where the levels are 1:10.

This is a modified constructor to allow for this, but please let me know if there is a better way.

The other PooledDataVector constructor could use this one, but would amount to an additional pass through x.

@tshort
Copy link
Contributor

tshort commented Aug 12, 2012

I didn't try running it, but it looks good to me, Chris. It will be useful to have this.

As to the other PooledDataVec constructor calling this one, that sort of thing is generally okay. I think Julia is pretty efficient with function calls. For this particular case, the constructors are just enough different that it may not be worth the effort.

@doobwa
Copy link
Contributor Author

doobwa commented Aug 13, 2012

Sounds good.

doobwa added a commit that referenced this pull request Aug 13, 2012
Allow PooledDataVector construction using a given pool.
@doobwa doobwa merged commit 1a2ae06 into JuliaData:master Aug 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants