Closed nsunami closed 1 month ago
Hello Nami and Ruben!
I'm encountering the same error (Error: Argument 1 must have names
for bind_rows()
) but I can't figure out how to solve it. By poking through codebook's R scripts, I see that the metadata.R file calls the aggregate_and_document_scale()
function. But I can't find metadata.R in the codebook library on my computer to toy around with the code. Wondering if someone can point me in the right direction.
H.
Hi Heather! I'm happy to take a look at your example if you can share it somewhere. My solution was to create another function for the fun
argument (to remove the argument na.rm=TRUE
). But I'm not sure if this solution applies to your case.
metadata.R
is available on this repo—here is the part that the aggregate_and_document_scale
function is being declared.
Thanks, Nami! I realize now that I was fundamentally misunderstanding something. My code never calls aggregate_and_document_scale()
so that can't be the source of the error for me. :\
When I backtrace the error, it appears to be an issue in codebook_table.R. Still sleuthing over here.
Well, I doubt anybody's keeping track but, for the record, I got smart and realized that something I was doing with the data after importing from SPSS but before generating the codebook was introducing the Error: Argument 1 must have names
message. After deleting extraneous code, the codebook generates without errors. I don't exactly know what I was doing that was problematic but it works now and I'm gonna go with it.
Hi @HeatherUrry and @nsunami. I think I know how to fix the first error, but it'd help me if you can create a small reproducible example of the second error for me Heather.
On Fri, Dec 24, 2021 at 7:19 PM Heather Urry @.***> wrote:
Well, I doubt anybody's keeping track but, for the record, I got smart and realized that something I was doing with the data after importing from SPSS but before generating the codebook was introducing the Error: Argument 1 must have names message. After deleting extraneous code, the codebook generates without errors. I don't exactly know what I was doing that was problematic but it works now and I'm gonna go with it.
— Reply to this email directly, view it on GitHub https://github.com/rubenarslan/codebook/issues/69#issuecomment-1000912181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGK5BONM7G6NFCK664DWPLUSS2U5ANCNFSM5D6LDVWQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi @rubenarslan, Thanks for getting back to me about this. I deleted the code that led to the error so I can't easily backtrace which specific code was problematic. Sorry! If I end up tracing it enough to put together a reproducible example, I'll let you know.
H.
codebook()
was failing with theError: Argument 1 must have names
forbind_rows()
. After some investigation, I found that the error is caused by my anonymous function inaggregate_and_document_scale()
I got a function like:
But, it was producing labels like
I declared a named function instead, and it worked just fine, like below.
It seems like each line of the anonymous function is currently treated as separate labels.