Skip to content

Commit d30ef99

Browse files
authored
Revise installation instructions in README
Updated installation instructions for R and celestial package, including troubleshooting steps.
1 parent e82837e commit d30ef99

1 file changed

Lines changed: 2 additions & 59 deletions

File tree

README.md

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,6 @@ Core package containing a collection of common astronomical conversion routines
1010

1111
## Installation
1212

13-
### Getting R
14-
15-
First things first, you will probably want to install a recent version of **R** that lets you build packages from source. The advantage of choosing this route is you can then update bleeding edge versions directly from GitHub. If you rely on the pre-built binaries on CRAN you might be waiting much longer.
16-
17-
#### Mac
18-
19-
For Mac just get the latest binaries from the **R** project pages:
20-
21-
<https://cloud.r-project.org/bin/macosx/>
22-
23-
#### Windows
24-
25-
For Windows just get the latest binaries from the **R** project pages:
26-
27-
<https://cloud.r-project.org/bin/windows/>
28-
29-
#### Linux
30-
31-
Debian: `sudo apt-get install r-base r-base-dev`
32-
33-
Fedora: `sudo yum install R`
34-
35-
Suse: More of a pain, see here <https://cloud.r-project.org/bin/linux/suse/README.html>
36-
37-
Ubuntu: `sudo apt-get install r-base-dev`
38-
39-
All the info on binaries is here: <https://cloud.r-project.org/bin/linux/>
40-
41-
Now you have **R** installed (hopefully) I would also suggest you get yourself **R-Studio**. It is a very popular and well maintained **R** IDE that gives you a lot of helpful shortcuts to scripting and analysing with **R**. The latest version can be grabbed from <https://www.rstudio.com/products/rstudio/> where you almost certainly want the free Desktop version.
42-
43-
### Getting celestial
44-
4513
Source installation from GitHub should be easy:
4614

4715
```R
@@ -50,31 +18,6 @@ remotes::install_github("asgr/celestial")
5018
library(celestial)
5119
```
5220

53-
A few Mac people seem to have issues with the above due to the backend used to download files. A work around seems to be to either use devtools:
54-
55-
```R
56-
install.packages('devtools')
57-
devtools::install_github("asgr/celestial")
58-
library(celestial)
59-
```
60-
61-
Or try the following:
62-
63-
```R
64-
Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true")
65-
remotes::install_github("asgr/celestial")
66-
```
67-
68-
If all of these do not work then the nuclear option is to download (or clone) the GitHub repo, cd to where the tar.gz file is and run in the **console** (or **Terminal** on Mac):
69-
70-
```console
71-
R CMD install celestial_X.Y.Z.tar.gz
72-
```
73-
74-
where X, Y and Z should be set as appropriate for the version downloaded (check the name of the file basically).
75-
76-
Failing all of the above, please raise an Issue here.
77-
7821
#### Package Dependencies
7922

8023
The above should also install the required packages. If you have trouble with this you can try installing the required packages manually first and then retry the installation for **celestial**:
@@ -121,7 +64,7 @@ deg2dms(-27.345, type='cat', sep='dms')
12164
Compute cosmological distances and related quantities for a given redshift:
12265

12366
```R
124-
cosdist(z=1, H0=70, OmegaM=0.3)
67+
cosdist(z=1:10, H0=70, OmegaM=0.3)
12568
```
12669

12770
This returns a data.frame with columns including comoving distance, luminosity distance, angular diameter distance, look-back time, and more.
@@ -156,7 +99,7 @@ coordref = cbind(RA=c(10.1, 10.5, 11.0), Dec=c(-20.1, -20.5, -21.0))
15699
coordcompare = cbind(RA=c(10.11, 10.6, 12.0), Dec=c(-20.09, -20.4, -22.0))
157100

158101
# Match within 10 arcsec
159-
match = coordmatch(coordref, coordcompare, rad=10)
102+
match = coordmatch(coordref, coordcompare, rad=10, radunit = 'amin')
160103
```
161104

162105
### WCS Projections

0 commit comments

Comments
 (0)