That's true, I also do get x and x2. My point is how I can make it to load x <- 2 and x2 <- 6 into the workspace? Imagine I am having a big chunk of code on the original computer that I am working on it. I want to close the Rstudio at work and open the project at home and continue working on the codes. If it doesn't bring back the codes there is no point in it at all.
Thanks in advance.
I normally save scripts on my google drive and then run them across my desktop PC and my mac laptop...the first thought is to check your paths and working directories. do you have any
setwd()commands in your scripts? are the same libraries installed in both? also, have you tried different machines too? if the script is not big and you want to try to share it here we can check whether it works on our machinesThanks for looking into it. First of all I must say that I am saving projects made by Rstudio not just scripts, in case I was not clear. Then for the rest of instructions you gave me, I created a
test-projectwithx <- 2in the source, then ran it so thexobject is present in theenvironment. So I have one object in environment and one line of code in source. I saved it over two clouds (Google Drive and OneDrive) and opened the projects from two other computers, but it doesn't load the code line. I assume it doesn't need to have all the libraries that the original R has. Is there anything that I am missing?! Thanks for your help in advance.