message when passing data with a variable called N
Closed this issue · 3 comments
macartan commented
> data = data.frame(N = 1:3)
> fabricate(data, M = 2)
Error: `data` must be uniquely named but has duplicate elements
diagnosands dataframes might often have a variable called "N" in them since that it a dimension along which expand_design likely operates; special use of N in fabricatr means it cannot be used in these. That's a cost.
- Useful to have a warning of the form : "fabricatr cannot accept dataframes with variables named N"
- Better, perhaps: temporarily rename N, implement operations, then restore name
- Better, perhaps, though possibly too late: use a more obscure name for fabricator's N.
nfultz commented
This seems like a internal implementation bug; but why would you ever pass
a diagnosand output to fabricate?
…On Tue, May 29, 2018 at 1:16 PM, macartan ***@***.***> wrote:
> data = data.frame(N = 1:3)
> fabricate(data, M = 2)
Error: `data` must be uniquely named but has duplicate elements
diagnosands dataframes might often have a variable called "N" in them
since that it a dimension along which expand_design likely operates;
special use of N in fabricatr means it cannot be used in these. That's a
cost.
- Useful to have a warning of the form : "fabricatr cannot accept
dataframes with variables named N"
- Better, perhaps: temporarily rename N, implement operations, then
restore name
- Better, perhaps, though possibly too late: use a more obscure name
for fabricator's N.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#130>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAZjTuzCdhMpweDiMQ2Y_bidm-FqenhFks5t3aysgaJpZM4USJxz>
.
macartan commented
Thabks. In this case for some analysis of the simulations_df that requires
manipulating output. In general though it's hard to predict usage.
Great if there were a fix to this.
…On Wed, 30 May 2018, 01:47 Neal Fultz, ***@***.***> wrote:
This seems like a internal implementation bug; but why would you ever pass
a diagnosand output to fabricate?
On Tue, May 29, 2018 at 1:16 PM, macartan ***@***.***>
wrote:
> > data = data.frame(N = 1:3)
> > fabricate(data, M = 2)
> Error: `data` must be uniquely named but has duplicate elements
>
> diagnosands dataframes might often have a variable called "N" in them
> since that it a dimension along which expand_design likely operates;
> special use of N in fabricatr means it cannot be used in these. That's a
> cost.
>
> - Useful to have a warning of the form : "fabricatr cannot accept
> dataframes with variables named N"
> - Better, perhaps: temporarily rename N, implement operations, then
> restore name
> - Better, perhaps, though possibly too late: use a more obscure name
> for fabricator's N.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#130>, or mute the
> thread
> <
https://github.com/notifications/unsubscribe-auth/AAZjTuzCdhMpweDiMQ2Y_bidm-FqenhFks5t3aysgaJpZM4USJxz
>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#130 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMJO_S7atOyi9KstWV7ZsRdXV-4YOogHks5t3d4EgaJpZM4USJxz>
.
jaspercooper commented
Like solution 2 a lot if not too hard, solution 1 seems like a very good idea in the meantime. Not keen on 3 because I love the special N syntax (willing to bear cost).