Learn R Programming

knitrdata (version 0.5.0)

insert_data_chunk_dialog: Invoke Rstudio addin to insert a data chunk in active source document

Description

As different elements of the data chunk are specified, other options will be modified as is likely to be useful. For example, if a binary file is uploaded, then the format will be set to binary, the encoding will be set to base64 and the Encode data? option will be checked. If these options are not appropriate, then they can be altered afterwards.

Usage

insert_data_chunk_dialog(title = "Data chunk inserter", chunk = NULL)

Arguments

title

Text to place in title bar of gadget.

chunk

Text content of the data chunk. If not given (as is typically the case), the create_data_chunk_dialog will be used to generate chunk contents.

Value

Returns TRUE if a chunk was inserted, FALSE otherwise.

Details

When the Create chunk button is clicked, the contents of the data chunk will be inserted at the current cursor location of the active source document in the Rstudio editor.

See Also

Other Chunk tools: create_chunk(), create_data_chunk_dialog(), insert_data_chunk_template(), list_rmd_chunks(), remove_chunks_dialog()

Examples

Run this code
# NOT RUN {
insert_data_chunk_dialog()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab