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

[formulas] allow passing array formula vectors #958

Merged
merged 1 commit into from Feb 24, 2024
Merged

Conversation

JanMarvin
Copy link
Owner

No description provided.

R/write.R Show resolved Hide resolved
attr(dfx, "f_ref") <- dims
} else {
rowcols <- dims_to_rowcol(dims)
ddims <- wb_dims(x = dfx$X, from_col = rowcols[[1]], from_row = as.integer(rowcols[[2]]))
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olivroy I was wondering, if we should add something like: wb_dims(from_dim = "A1").

Or even wb_dims(from_dims = "A1:D2") and additional positioning arguments like right, below, top, left. I have quite a few real life cases where I have to position various data frames next to each other on a single sheet, where I could envision this as useful. Might even be a integer argument, so that right = 2 would create a dims range two columns next to the original.

dims <- wb_dims(x = mtcars)
dims
#> "A1:K33"

wb_dims(from_dims = dims, x = mtcars, right = 2)
#> "M1:W33"

wb_dims(from_dims = dims, x = mtcars, below = 2)
#> "A35:K67"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can start by doing from_dims!

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be lovely!

R/write.R Show resolved Hide resolved
@JanMarvin JanMarvin merged commit aff5bcc into main Feb 24, 2024
9 checks passed
@JanMarvin JanMarvin deleted the array_fml_vectors branch February 24, 2024 15:04
@olivroy olivroy mentioned this pull request Feb 29, 2024
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.

None yet

2 participants