importData: importData: Import views directly from NETN forest database

View source: R/importData.R

importDataR Documentation

importData: Import views directly from NETN forest database

Description

This function imports all views in the ANALYSIS schema of the NETN_Forest backend. Each view is added to a VIEWS_NETN environment in your workspace, or to your global environment based on whether new_env = TRUE or FALSE. You must have the latest ODBC SQL driver installed for this function to work. It can be downloaded from: https://go.microsoft.com/fwlink/?linkid=2168524

Usage

importData(
  instance = c("local", "server"),
  server = NA,
  name = "NETN_Forest",
  new_env = TRUE
)

Arguments

instance

Specify whether you are connecting to the local instance or server.

"local"

Default. Connects to local install of backend database

"server"

Connects to main backend on server. Note that you must have permission to access the server, and connection speeds are likely to be much slower than the local instance. You must also be connected to VPN or NPS network.

server

Quoted name of the server to connect to, if instance = "server". Valid input is the server address to connect to the main database. If connecting to the local instance, leave blank.

name

Character. Specifies the name of the database. Default is "NETN_Forest"

new_env

Logical. Specifies which environment to store views in. If TRUE(Default), stores views in VIEWS_NETN environment. If FALSE, stores views in global environment

Value

NETN database views in specified environment

Examples

## Not run: 
# Import using default settings of local instance, server = 'localhost' and add VIEWS_NETN environment
importData()

# Import using computer name (# should be real numbers)
importData(server = "INPNETN-######", new_env = TRUE)

# Import from main database on server
importData(server = "INP###########\\########", instance = "server", new_env = TRUE)

## End(Not run)


KateMMiller/forestNETN documentation built on Nov. 11, 2024, 6:07 a.m.