How do I get R files to start? - r

I am learning how to use R from the following video:
https://www.youtube.com/watch?v=_V8eKsto3Ug
After downloading R he asked us to download 'R01_Intro_Files'and after I downloaded the zip folder provided in the description in the video and unzipped the folder the files would not open on my computer. Someone please instruct me on how to start these files.

If double-clicking R file does not open that file, you can simple open that from a GUI menu.
RGui
If you have RGui, go to File -> Open script...:
RStudio
And if you have RStudio, choose File -> Open file...:

Related

Not automatically downloading dropbox files when opening data in R

I recently bought a new Macbook pro (M1) and am trying to run R codes.
I open and run a R script that I have been working, but data such as csv, excel files, and RData in the dropbox are not loaded. It works only after I manually download the files in Finder, otherwise files are not automatically downloaded when trying to load in R.
Here is an example of the code and the error message
setwd('/Users/xxx/Dropbox/Data')
load('dta.RData')
Error in load("dta.RData") :
empty (zero-byte) input file
If I manually download the "dta.Rata" in finder (using Make Available Offline) and run the same code it works well.
Any solution?
I found that this
https://help.dropbox.com/installs-integrations/desktop/macos-12-monterey-support
I guess we should wait until Dropbox find the solution.

.Rproj file doesn't launch using Rstudio

I have an Renv package stored as tar.gz file.
I would like to unzip the folder and do the below steps
a) Click the .Rproj file
b) Use the "Install and Restart" option in Rstudio to build the package
However, the .Rproj file doesn't open. Instead, it keeps loading fprever and I get the below error.
The Rstudio server isbtaking a long time to respond. It is possible
that your Rsession jas become unresponsive. Do you want to terminate
the currently running R session
I am new to R and Rstudio. Any advice on what should I do to open this .Rproj file?

R script to check if my zip folder is corrupt

There is a python testzip() module to check if a zip file is corrupt in python. However i want to know it's parallel in R as well.
How to check if a zip folder is corrupt by writing a small script in R ?

Opening .rData files from anywhere when installing R without admin privileges on Windows 7

I've installed R like this many times but it always seems I blunder through some step so that I can open .rdata files from anywhere. Right now I can open Rgui.exe (my preferred approach) where it is installed (C:\Users\myname\Documents\R\R-2.15.3\bin\i386) but in no way can I open a .rData file.
I click the .rData and "open with..." but directing it to open r with the above path will not open the file. What is the subtle step to get this to work?

R: using package by unzipping it instead of installing it

I am trying to use a package which can not run at such in window Rgui. The website of the package suggests for unzip and use the function
http://mouse.cs.ucla.edu/emma/install.html
But I did not way to find where I can find the function that I can enter in my R console and use it.
Help appreciated
EDITS:
RGUi that comes with windows distribution
Packaged useed is: emma, can be downloaded from the above website
And the all-R, mouse-free version (I was almost there Roman!):
download.file("http://mouse.cs.ucla.edu/emma/emma_1.1.2.tar.gz",
destfile=paste(getwd(),"/emma/emma_1.1.2.tar.gz",sep=""))
untar(paste(getwd(),"/emma/emma_1.1.2.tar.gz",sep=""), compressed = "gzip")
source(paste(getwd(),"/emma/R/emma.R",sep=""))
wherein a new directory (emma/) will be created in your present working directory.
You can download the .tar.gz file and use untar function. I've moved the file in question to my Q drive in folder emma and ran the following command. The result was extracted to a folder called emma under my working directory.
untar("q:/emma/emma_1.1.2.tar.gz", compressed = "gzip")
After you've done that, you can source the .R files (see comments under your question).

Resources