Log in to DST
From Remote Desktop download to a running RStudio
This page guides you from the very first login to having RStudio running and being ready to execute code.
This guide assumes you are working with R. When you log in to DST, you choose βPython/Rβ β select R/RStudio.
Connect to the server
Step 1 β Download Microsoft Remote Desktop (Mac only)
Open the App Store on your Mac and search for βMicrosoft Remote Desktopβ. Download and install for free.
Windows users have Remote Desktop built in β search for βRemote Desktop Connectionβ in the Start menu.
Step 2 β Log in
- Go to remote.dst.dk in your browser
- Log in with your ident (4 letters) and the one-time code you receive
- Click βFSE Windowsβ
- Log in with username
dstfse\IDENT+PROJECTNUMBER(e.g.dstfse\abcd708421) and your chosen password
Step 3 β Select Python/R
You land on a selection desktop. Click Python/R.
A new desktop opens β find and open RStudio.
Step 4 β Find/create your own project folder
Open File Explorer and navigate to the workspaces folder under your project. Create a folder with your name or ident if it does not already exist:
E:/workdata/[projectnumber]/workspaces/[yourName]/
Recommended structure within your folder:
[yourName]/
my-project/
R/ β all your scripts (.R files)
datasets/ β intermediate results (.rds files, local to DST only)
output/ β tables and figures ready for repatriation
Step 5 β Mac keyboard fix (do this at every connection)
Special characters such as `, $, \, @, { and } do not work correctly in Remote Desktop by default on Mac.
Solution: Switch to Unicode mode with ββU (Ctrl + Cmd + U) inside the Remote Desktop window.
| Character | Mac shortcut in Unicode mode |
|---|---|
Pipe \| |
Option + i |
[ |
Option + 8 |
] |
Option + 9 |
{ |
Option + Shift + 8 |
} |
Option + Shift + 9 |
In RStudio, code is run with Ctrl+Enter (not Cmd+Enter).
Step 6 β Open RStudio and run a test line
getwd() # show the path to your project folderIf the line runs without error, you are ready.
DARTER-specific setup (project 708421)
Project 708421 uses the package dstDataPrep, which is not on CRAN and must be built manually. It provides access to load_database() and all DARTER register data.
See the complete guide: DARTER β overview and pipeline β
Create your R project
An R project collects all your scripts, output files and settings in one folder. Each study should have its own project.
- Open RStudio
- File β New Project β New Directory β New Project
- Give the project a name and choose a location under your workspace folder
- Click Create Project
Do not save workspace RStudio asks at close: βSave workspace image?β β always choose No. Set it permanently: Tools β Global Options β General β βSave workspace to .RDataβ β Never.
Make RStudio start faster on DST Disable the packages panel: Tools β Global Options β Packages β uncheck βEnable packages paneβ. You use library() and install.packages() directly in the code anyway.
DST documentation
OUTSIDE DST β TIMES (variable descriptions) Look up what a variable in a register means: dst.dk β TIMES documentation
ON DST β The Star on the desktop The Star opens DSTβs format table guide β used to find SAS files that translate codes to text (e.g. municipality numbers to municipality names). More: 14b β Format tables
Encountered a function you do not recognise? Look it up in 14a β Functions: overview.
First session β quick checklist
- Open your project β File β Open Project β your
.Rprojin the workspace folder, or double-click the.Rprojfile in File Explorer. - Verify β
getwd()runs without error.
From here
You are now logged in and set up. The rest of the guide teaches you to work with data:
- 4 β File types and loading β which files you encounter, and what opens them
- 5 β Extracting data step by step β open β filter β select β
collect(); the most important rule; what!!is - 8 β Know your registers β which register contains what
- 9 β Hospital contacts (LPR) β ICD codes, D-prefix, LPR2 vs LPR3
- 15 β Reference β functions, pitfalls and register reference when you get stuck
- Project 708421: DARTER β Register paths and datastores β paths and access to all registers