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

cursor_reach_index function #574

Open
daviddiviny opened this issue May 16, 2024 · 3 comments
Open

cursor_reach_index function #574

daviddiviny opened this issue May 16, 2024 · 3 comments

Comments

@daviddiviny
Copy link

daviddiviny commented May 16, 2024

I have been using this code in a script and wondered whether it should be added to {officer}

cursor_reach_index <- function (x, doc_index)
{
    x$officer_cursor$which <- doc_index
    x
}
@markheckmann
Copy link
Contributor

AFAICS, the rttpx object has no officer_cursor element.

officer::read_pptx() |> names() |> sort()

 [1] "content_type"          "core_properties"       "cursor"                "doc_properties_custom"
 [5] "masterLayouts"         "notesMaster"           "notesSlide"            "package_dir"          
 [9] "presentation"          "rel"                   "slide"                 "slideLayouts"         
[13] "table_styles"   

What is x here and what is this function supposed to do?

@davidgohel
Copy link
Owner

@markheckmann @daviddiviny is using the Word object, it has a cursor object :)

@elipousson
Copy link
Contributor

Not sure if it would be helpful or not but I wrote a couple of wrappers adding some extra functionality and flexibility to the cursor functions https://github.com/elipousson/officerExtras/blob/main/R/cursor_docx.R

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

No branches or pull requests

4 participants