Inserting Graphics to LyX - lyx

I need to insert graphics in a lyx document. However, when I do: Insert->Graphics...etc The graphic file is just linked and is not physically in the lyx file. If I need to send the lyx file to someone I need to send the graphic files separately. Is there a way to include the graphics in the lyx file.
I hope I was clear.

You should keep the Lyx document and graphics (or copies of them) in the same directory, and use relative paths when you insert them into your document. When you need to send it, just create an archive (.zip or other) and send that compressed archive.

LyX never links graphics into the .lyx file. Though there is semi-official python script which zip all related material into one archive...

Related

How can my rendered RMarkdown/Quarto document with html widgets be linked to a live csv?

Correct me if I'm wrong: The examples online are generally for a static data set. The executed R code reads data into an R data frame and creates the html widgets to plot it. Upon rendering the .Rmd or .qmd, that data set is baked into the html document. If you wanted the document to show some new data, you'd have to run the R code again.
Is there a way to create a rendered .html with html widgets that's linked to a live .csv or SQL database? Perhaps there are some R tools that upon rendering the document, create the html/js instructions to read a .csv or .json file?
Looking to have an .html file that can be shared or hosted that doesn't require an R interpreter.

Trying to import data into R in a way that will allow anyone to access it when opening the markdown file/ accessing the html knit

I am currently working on a coding project and I am running into trouble with how i Should import the data set. We are supposed to have it read in a way so that our instructor can access our markdown file and be able to import the data and run the code without changing file paths. I know about using relative file paths to make it accessible to anyone, however I don't know how to get around the /users/owner part of the file path. Any help would be greatly appreciated and if you have any further questions feel free to ask.
I've tried changing the working directory to a certain folder that both I and my instructor have named the same thing, however, like I said above, when I use read.csv to import the data frame I am still forced to use the /users/owner filepath which obviously is specific to my computer.
I can understand your supervisor, I request the same from my students. My recommended solution is to put both data and R script (or the .Rmd file) in the same folder. Then one does not need to add a path in the read.csv (or similar) function.
If you use RStudio, move to the folder in the Files pane and then use the gear icon and select "Set as Working Directory".
Then send both files (.R or .Rmd) and the data to the supervisor, ideally as a zip file. The supervisor can then unpack it to an arbitrary folder and just double click to the .R/.Rmd file. The containing folder will then automatically become the working directory.
Other options are:
to use a subfolder for the data or
to put the data to a publicly readable internet location, e.g.
Github and read it directly from there.
The last option requires of course that the data have a free license.

Best way to collaborate with manager on R Markdown reports?

I'm producing plenty of analyses in R and utilizing the .html Markdown format to present and communicate work. Often, my manager will need to correct/add to the text which accompanies the code blocks, and has practically no interaction with the code blocks. The analyses are typically produced by myself alone, so code collaboration is a low priority.
In an ideal world, he could open up the .html and edit the text in a browser, which I understand is not possible.
Are there any simple solutions for this? I am sure this is a common problem so there must be an easy solution I am overlooking. Here are the current solutions being considered:
Use Git (but my manager wouldn't like to learn Git)
Use Jupyter Notebooks (but I would prefer to stick with R Markdown for integration with RStudio and for the reproducible templates)
Knit the Markdown as a word document with manual version control on a shared network, allow tracking of changes in the word document, and copy-and-paste over changes made to the .Rmd file
The latter is least elegant but most likely to be used at the moment. If you have any suggestions, please let me know!
Here's a solution that is tailor-made your exact situation.
Use jupytext for bi-directional lossless interoperability between jupyter notebooks and R Markdown documents!
Maybe redoc is an option for you. Haven't tried it myself and it's still experimental but it would allow you to collaborate via Word. Basically the Word document can be edited and passed back to RMarkdown with all changes. See here.
I suggest you try trackdown https://claudiozandonella.github.io/trackdown/
trackdown offers a simple answer to collaborative writing and editing of R Markdown (or Sweave) documents. Using trackdown, the local .Rmd (or .Rnw) file is uploaded as plain-text in Google Drive where, thanks to the easily readable Markdown (or LaTeX) syntax and the well-known online interface offered by Google Docs, collaborators can easily contribute to the writing and editing of the narrative part of the document. After integrating all authors’ contributions, the final document can be downloaded and rendered locally.
Moreover, you can hide code chunks setting hide_code = TRUE (they will be automatically restored when downloaded). This prevents collaborators from inadvertently making changes to the code that might corrupt the file and it allows collaborators to focus only on the narrative text ignoring code jargon.
You can also upload the actual Output (i.e., the resulting complied document) in Google Drive together with the .Rmd (or .Rnw) document. This helps collaborators to evaluate the overall layout, figures and tables and it allows them to use comments on the pdf to propose and discuss suggestions.

How to open non .rda files in R

I am trying to do some work for my thesis which has me using the R programming language (and the R app on Mac OS Lion) for the first time. I had to download the files from here to work with but none of the files comes in .rda or .r they all come in different file extensions. Can someone please tell me how to either convert or use these files?
This page might be relevant to your interests. Also note that if you click on the link on that page that says "Analyze with GEO2R" you can get an R script created for you that will do some of the legwork for you. I would highly suggest reading the instructions on that page in order to get things prepared the way you want them to be.

Convert RTF to PDF on a rule into Alfresco

I found a link (http://wiki.alfresco.com/wiki/Content_Transformations) that says that i need to create a file named my-transformers-context.xml and put my configurations there to convert RTF to PDF...
There says that some configuration are already configured but this one (RTF to PDF) and some others (DOC to PDF) are not.
By the way i couldn't find how to create this xml with the right configuration to convert the RTF file into a PDF...
Someone already done something like this? or someone know a link that explain how to configure this xml file?
PROBLEM SOLVED!!!!
I don't know if there is a way to say that i've solved the problem... But here it goes the solution...
I saw what Gagravarr said and started looking for configuration of openoffice into alfresco...
There is a file named:
alfresco-global.properties
and there is two variables named:
ooo.exe
and
ooo.enabled
the first one must indicate the path to sopenoffice.exe
and the second one must be equal to true...
ooo.enabled = true
That solve a lot of problema to convert some kind of file to another... like RTF to PDF...
Out of the box, Alfresco should be able to transform a RTF file to a PDF using OpenOffice (direct or JodConverter, depending on if you're on Community or Enterprise)
Assuming you're on a new enough Alfresco, this webscript will tell you what transformations are available from and to RTF:
http://localhost:8080/alfresco/service/mimetypes?mimetype=application/rtf#application/rtf
If that doesn't show you RTF -> PDF, then you need to look at your open office configuration/setup

Resources