content
large_stringlengths
0
6.46M
path
large_stringlengths
3
331
license_type
large_stringclasses
2 values
repo_name
large_stringlengths
5
125
language
large_stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
4
6.46M
extension
large_stringclasses
75 values
text
stringlengths
0
6.46M
setwd('c:/users/cbwilsey/documents/github/scripts/') library(maptools) library(sp) library(RColorBrewer) library(fields) source('data.prep.r') source('map.plot.r') source('extract.number.r') # extract.number <- function(x,var.name) { temp <- as.numeric(strsplit(x,split=var.name)[[1]][2]); return(temp) } create.figu...
/plot.polygons.dist.r
no_license
ranalut/Scripts
R
false
false
8,473
r
setwd('c:/users/cbwilsey/documents/github/scripts/') library(maptools) library(sp) library(RColorBrewer) library(fields) source('data.prep.r') source('map.plot.r') source('extract.number.r') # extract.number <- function(x,var.name) { temp <- as.numeric(strsplit(x,split=var.name)[[1]][2]); return(temp) } create.figu...
#' It prepares a KRSA kinase file to be used for creedenzymatic #' #' Takes in the Z score table and output kinase with their scores #' #' @param krsa_table a df of the Z score table #' @param file_name file name and path to save file as txt tab delimited file #' #' @return saved txt file to be used in creedenzymatic #...
/R/krsa_ce_output_kinases.R
permissive
AliSajid/KRSA
R
false
false
523
r
#' It prepares a KRSA kinase file to be used for creedenzymatic #' #' Takes in the Z score table and output kinase with their scores #' #' @param krsa_table a df of the Z score table #' @param file_name file name and path to save file as txt tab delimited file #' #' @return saved txt file to be used in creedenzymatic #...
source('sim_functions_20200326.R') mu = 11 kappa = 1.1 beta = mu * 30 gridsize = NULL trk = sim.track(burnin = 875, n.steps = 2500, beta.mem = 0, mean.mem = 750, sd.mem = 30, threshold = 1, mu = mu, kappa = kappa, gridsize = gridsize, n.res = 1, print = 50) trk.tofit = sim.controls(tr...
/grizzly_testmemcase_20200416.R
no_license
pthompson234/detectingmemory
R
false
false
893
r
source('sim_functions_20200326.R') mu = 11 kappa = 1.1 beta = mu * 30 gridsize = NULL trk = sim.track(burnin = 875, n.steps = 2500, beta.mem = 0, mean.mem = 750, sd.mem = 30, threshold = 1, mu = mu, kappa = kappa, gridsize = gridsize, n.res = 1, print = 50) trk.tofit = sim.controls(tr...
args <- commandArgs(trailingOnly = TRUE) model_file <- args[1] data_file <- args[2] model <- readRDS(model_file) data <- read.csv(data_file) print(predict(model, data))
/src/run_model_local.r
permissive
c-w/r-sql-server-demo
R
false
false
171
r
args <- commandArgs(trailingOnly = TRUE) model_file <- args[1] data_file <- args[2] model <- readRDS(model_file) data <- read.csv(data_file) print(predict(model, data))
#' Extract or modify the text #' #' \code{xml_text} returns a character vector, \code{xml_double} returns a #' numeric vector, \code{xml_integer} returns an integer vector. #' @inheritParams xml_name #' @param trim If \code{TRUE} will trim leading and trailing spaces. #' @return A character vector, the same length as x...
/R/xml_text.R
no_license
gothub/xml2
R
false
false
2,817
r
#' Extract or modify the text #' #' \code{xml_text} returns a character vector, \code{xml_double} returns a #' numeric vector, \code{xml_integer} returns an integer vector. #' @inheritParams xml_name #' @param trim If \code{TRUE} will trim leading and trailing spaces. #' @return A character vector, the same length as x...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_collection_library.R \name{pull_TS_data} \alias{pull_TS_data} \title{Pull TS Data} \usage{ pull_TS_data(username, password, last_try, test_mode, root_config_list, regional_config_list, sender, mailbox_password) } \arguments{ \item{user...
/scopeR/man/pull_TS_data.Rd
permissive
stefmolin/SCOPE-anomaly-detection-emails
R
false
true
934
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_collection_library.R \name{pull_TS_data} \alias{pull_TS_data} \title{Pull TS Data} \usage{ pull_TS_data(username, password, last_try, test_mode, root_config_list, regional_config_list, sender, mailbox_password) } \arguments{ \item{user...
## simulate in parallel using parlappy() rm(list=ls()) ## parallelize simulation of 100 iterations library(ergm) library(network) library(snow) library(Rmpi) library(methods) load("parallel-ergm-imputation-steve-ex.RData") simulate_in_parallel <- function(imputed.ergm.object){ library(network) library(e...
/examples/simulate-steve-example.R
no_license
khanna7/uconnect-missing-ties
R
false
false
1,079
r
## simulate in parallel using parlappy() rm(list=ls()) ## parallelize simulation of 100 iterations library(ergm) library(network) library(snow) library(Rmpi) library(methods) load("parallel-ergm-imputation-steve-ex.RData") simulate_in_parallel <- function(imputed.ergm.object){ library(network) library(e...
#Downloading file Url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" if (!file.exists("./exdata-data-household_power_consumption.zip")) { download.file(Url, destfile = "./exdata-data-household_power_consumption.zip") } #Unzip file unzip("./exdata-data-household_power_consumpti...
/plot4.R
no_license
yonascustom/ExData_Plotting1
R
false
false
2,677
r
#Downloading file Url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" if (!file.exists("./exdata-data-household_power_consumption.zip")) { download.file(Url, destfile = "./exdata-data-household_power_consumption.zip") } #Unzip file unzip("./exdata-data-household_power_consumpti...
library(phylosim) ### Name: clone.ToleranceSubstitution ### Title: Clone a ToleranceSubstitution object ### Aliases: clone.ToleranceSubstitution ToleranceSubstitution.clone ### clone,ToleranceSubstitution-method ### ** Examples # create a ToleranceSubstitution object p<-ToleranceSubstitution( ...
/data/genthat_extracted_code/phylosim/examples/clone.ToleranceSubstitution.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
591
r
library(phylosim) ### Name: clone.ToleranceSubstitution ### Title: Clone a ToleranceSubstitution object ### Aliases: clone.ToleranceSubstitution ToleranceSubstitution.clone ### clone,ToleranceSubstitution-method ### ** Examples # create a ToleranceSubstitution object p<-ToleranceSubstitution( ...
\name{multinet.generation} \alias{multinet.generation} \alias{grow_ml} \alias{evolution_pa_ml} \alias{evolution_er_ml} \title{ Generation of multilayer networks } \description{ The grow_ml function generates a multilayer network by letting it grow for a number of steps, where for each step three events can happen: (1) ...
/fuzzedpackages/multinet/man/Generation.Rd
no_license
akhikolla/testpackages
R
false
false
3,099
rd
\name{multinet.generation} \alias{multinet.generation} \alias{grow_ml} \alias{evolution_pa_ml} \alias{evolution_er_ml} \title{ Generation of multilayer networks } \description{ The grow_ml function generates a multilayer network by letting it grow for a number of steps, where for each step three events can happen: (1) ...
# fit_measles_state_space.R: # R script to fit a Bayesian state space model to the measles case data from # Niamey, Niger from 1995-2005. This script fits the specified model using # MCMC via JAGS. The posterior distributions are summarized and saved. # NOTE: Full MCMC output is NOT saved currently, as this is a d...
/extras/preliminary-code/bayes_hpc/fit_measles_state_space.R
permissive
project-aero/measles-ews
R
false
false
7,972
r
# fit_measles_state_space.R: # R script to fit a Bayesian state space model to the measles case data from # Niamey, Niger from 1995-2005. This script fits the specified model using # MCMC via JAGS. The posterior distributions are summarized and saved. # NOTE: Full MCMC output is NOT saved currently, as this is a d...
permute3levelt2 <- function(listind){ relist(sample(unlist(listind)),listind) }
/R/permute3levelt2.R
no_license
cran/mvctm
R
false
false
88
r
permute3levelt2 <- function(listind){ relist(sample(unlist(listind)),listind) }
#read in all the individual Ran structures library(tidyverse) library(bio3d) files <- read_tsv("PyMOL_figures/pdbs/structures.lst", col_names = F)$X1 files <- files[grepl('pdb', files)] # read all the pdb files in one list object pdbs <- pdbaln(files) core <- core.find(pdbs) plot(core) # gives indices of residues that ...
/PyMOL_figures/pdbs/clean_deprecated/Kabsch_align_Rans.R
no_license
tinaperica/Gsp1_manuscript
R
false
false
582
r
#read in all the individual Ran structures library(tidyverse) library(bio3d) files <- read_tsv("PyMOL_figures/pdbs/structures.lst", col_names = F)$X1 files <- files[grepl('pdb', files)] # read all the pdb files in one list object pdbs <- pdbaln(files) core <- core.find(pdbs) plot(core) # gives indices of residues that ...
#View Screens setwd("~/Documents/Research Projects/Personality/Dissertation/Data") data <- read.csv("/Users/ccasti02/Documents/Research Projects/Personality/Dissertation/Data/Measured Screens.csv") View(data) #Q19.Do any of these conditions apply regarding your employment status (Please be honest, we will allo... #Q28...
/Personality/Dissertation/Data/R Syntax/Screen Analyses.R
no_license
chriscastille6/Ideal-Point-Items-and-Network-Analysis-Project
R
false
false
596
r
#View Screens setwd("~/Documents/Research Projects/Personality/Dissertation/Data") data <- read.csv("/Users/ccasti02/Documents/Research Projects/Personality/Dissertation/Data/Measured Screens.csv") View(data) #Q19.Do any of these conditions apply regarding your employment status (Please be honest, we will allo... #Q28...
## makeChacehMatrix() creates a matrix object which can cache its inverse makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y){ x <<- y inv <<- NULL } get <- function()x setinv <- function(inverse)inv <<- inverse getinv <- function()inv list(set=set, get=get, setinv=setinv,...
/cachematrix.R
no_license
ReinaSuzuki230/Rprogrammingassignment2
R
false
false
726
r
## makeChacehMatrix() creates a matrix object which can cache its inverse makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y){ x <<- y inv <<- NULL } get <- function()x setinv <- function(inverse)inv <<- inverse getinv <- function()inv list(set=set, get=get, setinv=setinv,...
#' @title Simulates precipitation and temperature sequence. #' @description First, values with daily time resoultion are simulated using either GP or exponential distribution, then temporal patterns are used to #' disaggregate the values #' By default it uses parallel processing using 4 cores #' #' #' @param pathmain...
/R/smrainflFt624intmatr100000lapply.R
permissive
honglioslo/StochasticPQRUT
R
false
false
4,619
r
#' @title Simulates precipitation and temperature sequence. #' @description First, values with daily time resoultion are simulated using either GP or exponential distribution, then temporal patterns are used to #' disaggregate the values #' By default it uses parallel processing using 4 cores #' #' #' @param pathmain...
##' Bin counts are normalized by regressing out the effect of the first Principal ##' Components. Beforehands, the average coverage is normalized. Then PC are computed ##' using \code{prcomp} function and regressed out using linear regression. ##' @title PCA-based normalization of bin counts ##' @param bc.df a data.fra...
/R/pca.norm.R
no_license
hjanime/PopSV
R
false
false
2,805
r
##' Bin counts are normalized by regressing out the effect of the first Principal ##' Components. Beforehands, the average coverage is normalized. Then PC are computed ##' using \code{prcomp} function and regressed out using linear regression. ##' @title PCA-based normalization of bin counts ##' @param bc.df a data.fra...
## ---- include=FALSE------------------------------------------------------ knitr::opts_chunk$set(echo = TRUE,message=F,warning = F) ## ----eval=F-------------------------------------------------------------- ## install.packages("ctv") ## library("ctv") ## install.views("Bayesian") ## ----message=F-------------------...
/2019/rcode/EinfacheGrafiken.R
no_license
Japhilko/IntroR
R
false
false
3,019
r
## ---- include=FALSE------------------------------------------------------ knitr::opts_chunk$set(echo = TRUE,message=F,warning = F) ## ----eval=F-------------------------------------------------------------- ## install.packages("ctv") ## library("ctv") ## install.views("Bayesian") ## ----message=F-------------------...
# A pair of functions that cache the inverse of a matrix. # The first function, 'makeCacheMatrix' creates a matrix and its inverse. # It's output a list containing a function to # 1. set the value of the matrix # 2. get the value of the matrix # 3. set the value of the inverse # 4. get the value of the inverse m...
/cachematrix.R
no_license
PallaviAnil/ProgrammingAssignment2
R
false
false
1,925
r
# A pair of functions that cache the inverse of a matrix. # The first function, 'makeCacheMatrix' creates a matrix and its inverse. # It's output a list containing a function to # 1. set the value of the matrix # 2. get the value of the matrix # 3. set the value of the inverse # 4. get the value of the inverse m...
library(readr) library(data.table) library(stringr) library(dplyr) devtools::install_github("amd112/rseiAnalysis") library("rseiAnalysis") #crosswalks from 1990 and 2000 census geographies to 2010 geography cross2000 = fread("data/census/raw/crosswalk_00_tract.csv", data.table = FALSE) cross1990 = fread("data/census/r...
/census_crosswalk_extrapolate_income.R
no_license
DukeStatSci/thesis-sp18-driscoll-envjustice
R
false
false
5,859
r
library(readr) library(data.table) library(stringr) library(dplyr) devtools::install_github("amd112/rseiAnalysis") library("rseiAnalysis") #crosswalks from 1990 and 2000 census geographies to 2010 geography cross2000 = fread("data/census/raw/crosswalk_00_tract.csv", data.table = FALSE) cross1990 = fread("data/census/r...
library(phylotaR) ### Name: get_ntaxa ### Title: Count number of unique taxa ### Aliases: get_ntaxa ### ** Examples data('bromeliads') # how many species are there? (get_ntaxa(phylota = bromeliads, cid = '0', rnk = 'species')) # how many genera are there? (get_ntaxa(phylota = bromeliads, cid = '0', rnk = 'genus')) ...
/data/genthat_extracted_code/phylotaR/examples/get_ntaxa.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
487
r
library(phylotaR) ### Name: get_ntaxa ### Title: Count number of unique taxa ### Aliases: get_ntaxa ### ** Examples data('bromeliads') # how many species are there? (get_ntaxa(phylota = bromeliads, cid = '0', rnk = 'species')) # how many genera are there? (get_ntaxa(phylota = bromeliads, cid = '0', rnk = 'genus')) ...
logprint <- function(msg, checkverbose=FALSE, checkshowmsg=FALSE, preprint="", level="") { if (identical(msg, magicmsg_first_connection)) return(invisible()) if ((getval(serverlog) && !checkverbose && !checkshowmsg) || (getval(verbose) && checkverbose) || (getval(showmsg) && checkshowmsg)) { logmsg <- ...
/remoter/R/logging.r
no_license
ingted/R-Examples
R
false
false
974
r
logprint <- function(msg, checkverbose=FALSE, checkshowmsg=FALSE, preprint="", level="") { if (identical(msg, magicmsg_first_connection)) return(invisible()) if ((getval(serverlog) && !checkverbose && !checkshowmsg) || (getval(verbose) && checkverbose) || (getval(showmsg) && checkshowmsg)) { logmsg <- ...
library(shiny) library(dplyr) library(ggplot2) library(stringr) library(readtext) library(plotly) library(shinythemes) library(DT) library(data.table) library(tidyverse) library(shinyBS) library(shinyLP) function(input, output) { account_mat <- reactive({ shinyLP::runExample() index <- as...
/updated_charts/server.R
no_license
jonisaac/shiny
R
false
false
7,600
r
library(shiny) library(dplyr) library(ggplot2) library(stringr) library(readtext) library(plotly) library(shinythemes) library(DT) library(data.table) library(tidyverse) library(shinyBS) library(shinyLP) function(input, output) { account_mat <- reactive({ shinyLP::runExample() index <- as...
library(Funclustering) ### Name: plotfd ### Title: plot a functional data object ### Aliases: plotfd ### ** Examples data(growth) data=cbind(matrix(growth$hgtm,31,39),matrix(growth$hgtf,31,54)); t=growth$age; splines <- create.bspline.basis(rangeval=c(1, max(t)), nbasis = 20,norder=4); fd <- Data2fd(data, argvals=t...
/data/genthat_extracted_code/Funclustering/examples/plotfd.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
434
r
library(Funclustering) ### Name: plotfd ### Title: plot a functional data object ### Aliases: plotfd ### ** Examples data(growth) data=cbind(matrix(growth$hgtm,31,39),matrix(growth$hgtf,31,54)); t=growth$age; splines <- create.bspline.basis(rangeval=c(1, max(t)), nbasis = 20,norder=4); fd <- Data2fd(data, argvals=t...
sample_space <- 500; mean <- 0.60; standard_error <- sqrt((mean * (1-mean))/sample_space) standard_error <- round(standard_error,3) cat("standard error is",standard_error) p <- 2 * standard_error cat("required value is",p)
/Introduction_To_Probability_And_Statistics_by_William_Mendenhall,_Robert_J_Beaver,_And_Barbara_M_Beaver/CH7/EX7.6/Ex7_6.R
permissive
FOSSEE/R_TBC_Uploads
R
false
false
228
r
sample_space <- 500; mean <- 0.60; standard_error <- sqrt((mean * (1-mean))/sample_space) standard_error <- round(standard_error,3) cat("standard error is",standard_error) p <- 2 * standard_error cat("required value is",p)
\name{make.unique.psl} \alias{make.unique.psl} \title{Convert a PSL alignment data.frame into a minimal 1:1 alignment file where each query has at most one target} \usage{ make.unique.psl(psl, quick = FALSE, ambig.thresh = 0.95) } \arguments{ \item{psl}{a psl data.frame; see import.psl} \item{quick}{if \code{TRU...
/man/make.unique.psl.Rd
no_license
drmjc/blat
R
false
false
1,406
rd
\name{make.unique.psl} \alias{make.unique.psl} \title{Convert a PSL alignment data.frame into a minimal 1:1 alignment file where each query has at most one target} \usage{ make.unique.psl(psl, quick = FALSE, ambig.thresh = 0.95) } \arguments{ \item{psl}{a psl data.frame; see import.psl} \item{quick}{if \code{TRU...
##R code ##Tutorial_v1.0.R ##this R code is used to test and try the new version of PAST, ##which fits the data with the PMT gain power function with baseline. ##version 1.0 ## ##by Feng @ 1/28/2019 ## #++++++++++++updated # 3/31/2019 #++to do no BC data analysis and fitting #_______________ ##==================== ...
/dev/Tutorial_v1.0_fnPWB.R
no_license
BULQI/gainscan
R
false
false
9,258
r
##R code ##Tutorial_v1.0.R ##this R code is used to test and try the new version of PAST, ##which fits the data with the PMT gain power function with baseline. ##version 1.0 ## ##by Feng @ 1/28/2019 ## #++++++++++++updated # 3/31/2019 #++to do no BC data analysis and fitting #_______________ ##==================== ...
############ Model Comparisons ################# # This Means that we are starting with simple model and adding more variables # and compare. # A control variable is any variable that's held constant in a research study. # basically putting their coefficients as 0.
/Model Comparison.R
no_license
amitbidlan/Statistics-Using-R
R
false
false
274
r
############ Model Comparisons ################# # This Means that we are starting with simple model and adding more variables # and compare. # A control variable is any variable that's held constant in a research study. # basically putting their coefficients as 0.
# Picaro flux analyses rm(list = ls()) # Packages library(readr) library(dplyr) library(lubridate) library(stringr) # Directory where PF monthly files are stored dir <- '~/Other Projects/Justin Picarro/' setwd(dir) # Data where flux data is accessed df <- read.csv('PF_Flux_2020.csv') # vector of...
/2020_PF_Flux_v2.R
no_license
Green-Currey/Picarro-Analyses
R
false
false
6,955
r
# Picaro flux analyses rm(list = ls()) # Packages library(readr) library(dplyr) library(lubridate) library(stringr) # Directory where PF monthly files are stored dir <- '~/Other Projects/Justin Picarro/' setwd(dir) # Data where flux data is accessed df <- read.csv('PF_Flux_2020.csv') # vector of...
#' File Index module #' #' Build a CQL query for a precompiled model #' Pull the retuned objects back into R #' #' @rdname DistMvFileIndex #' #' @param sc Spark context used for the scala context #' @param session The cassandra session NULL #' Dispatch the Distinct File Index query #' #' @export cql_dist_file_index_qu...
/R/file_index.R
permissive
ancache/CQLConnect
R
false
false
2,006
r
#' File Index module #' #' Build a CQL query for a precompiled model #' Pull the retuned objects back into R #' #' @rdname DistMvFileIndex #' #' @param sc Spark context used for the scala context #' @param session The cassandra session NULL #' Dispatch the Distinct File Index query #' #' @export cql_dist_file_index_qu...
structure(list( url = "https://www.fleaflicker.com/api/FetchLeagueBoxscore?sport=NFL&scoring_period=4&fantasy_game_id=46301755&league_id=206154", status_code = 200L, headers = structure(list( date = "Tue, 24 Nov 2020 01:17:36 GMT", `content-type` = "application/json;charset=utf-8", vary = "accept-encoding",...
/tests/testthat/www.fleaflicker.com/api/FetchLeagueBoxscore-fe6677.R
permissive
tonyelhabr/ffscrapr
R
false
false
504,791
r
structure(list( url = "https://www.fleaflicker.com/api/FetchLeagueBoxscore?sport=NFL&scoring_period=4&fantasy_game_id=46301755&league_id=206154", status_code = 200L, headers = structure(list( date = "Tue, 24 Nov 2020 01:17:36 GMT", `content-type` = "application/json;charset=utf-8", vary = "accept-encoding",...
# Final Project: Baseball Data Analysis library(Lahman) library(dplyr) # Subset "Teams" to only include teams from 1985-2016 (the years for which we have salary information) Teams0 <- Teams[1918:2835, ] # Subset "Batting" to only include data from 1985-2016 (the years for which we have salary information) Batting0 <...
/AnthonyAlexDataWranglingWk2.R
no_license
jazippay/portfolio
R
false
false
4,631
r
# Final Project: Baseball Data Analysis library(Lahman) library(dplyr) # Subset "Teams" to only include teams from 1985-2016 (the years for which we have salary information) Teams0 <- Teams[1918:2835, ] # Subset "Batting" to only include data from 1985-2016 (the years for which we have salary information) Batting0 <...
library(timechange) ### Name: time-zones ### Title: Time-zone manipulation ### Aliases: time-zones time_at_tz time-zones time_force_tz time-zones ### time_clock_at_tz ### ** Examples x <- as.POSIXct("2009-08-07 00:00:00", tz = "America/New_York") time_at_tz(x, "UTC") time_force_tz(x, "UTC") time_force_tz(x, "Eur...
/data/genthat_extracted_code/timechange/examples/time-zones.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,360
r
library(timechange) ### Name: time-zones ### Title: Time-zone manipulation ### Aliases: time-zones time_at_tz time-zones time_force_tz time-zones ### time_clock_at_tz ### ** Examples x <- as.POSIXct("2009-08-07 00:00:00", tz = "America/New_York") time_at_tz(x, "UTC") time_force_tz(x, "UTC") time_force_tz(x, "Eur...
#' Integration and formating of the TF activities files #' corresponding to the B3 benchmarck dataset GSE31912 #' described in: https://www.biorxiv.org/content/biorxiv/early/2018/06/18/337915.full.pdf #' #' #'#' This code loads the individual TF activity files (tables; one file per REGULON DATASET) #' and integrates ...
/code/regulons_QC/2_activities_2_ranks/B3_cancermodelsBasal.r
no_license
Ran485/TFbenchmark
R
false
false
3,801
r
#' Integration and formating of the TF activities files #' corresponding to the B3 benchmarck dataset GSE31912 #' described in: https://www.biorxiv.org/content/biorxiv/early/2018/06/18/337915.full.pdf #' #' #'#' This code loads the individual TF activity files (tables; one file per REGULON DATASET) #' and integrates ...
# # This is the server logic of a Shiny web application. You can run the # application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(tidyverse) library(here) source(here("code/read_wrangle.R")) vias = read_wrangl...
/vias-app/server.R
no_license
nazareno/nomes-em-cg
R
false
false
1,159
r
# # This is the server logic of a Shiny web application. You can run the # application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(tidyverse) library(here) source(here("code/read_wrangle.R")) vias = read_wrangl...
# Pacotes ----------------------------------------------------------------- library(tidyverse) # Base de dados ----------------------------------------------------------- imdb <- read_rds("dados/imdb.rds") # select ------------------------------------------------------------------ # exemplo 1 select(imdb, titulo,...
/scripts/03-manipulacao.R
permissive
curso-r/201910-intro-r-john-deere
R
false
false
8,422
r
# Pacotes ----------------------------------------------------------------- library(tidyverse) # Base de dados ----------------------------------------------------------- imdb <- read_rds("dados/imdb.rds") # select ------------------------------------------------------------------ # exemplo 1 select(imdb, titulo,...
################################## text_training setwd("E:\\proj\\") text_training.df <- read.csv("text_training.csv") text_training.df$rating = factor(text_training.df$rating) library(randomForest) library(AUC) library(party) library(caret) set.seed(5) rffit <- randomForest(rating ~ ., data=text_trainin...
/text_analysis.R
no_license
Galzi1/AdvancedSubjectsData
R
false
false
2,014
r
################################## text_training setwd("E:\\proj\\") text_training.df <- read.csv("text_training.csv") text_training.df$rating = factor(text_training.df$rating) library(randomForest) library(AUC) library(party) library(caret) set.seed(5) rffit <- randomForest(rating ~ ., data=text_trainin...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Evaluate Results.R \name{below_percentage} \alias{below_percentage} \title{Calculate the portion of scores that are lower than a given percentage score} \usage{ below_percentage(result, below, inclusive = TRUE) } \arguments{ \item{result}{The...
/man/below_percentage.Rd
no_license
DanNashSoton/GuessR
R
false
true
758
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Evaluate Results.R \name{below_percentage} \alias{below_percentage} \title{Calculate the portion of scores that are lower than a given percentage score} \usage{ below_percentage(result, below, inclusive = TRUE) } \arguments{ \item{result}{The...
library(tidyverse) library(tidymodels) tree_res <- readRDS("data/c4_tree_res.rds") tree_metrics <- tree_res %>% collect_metrics() glimpse(tree_metrics) tree_metrics %>% mutate(tree_depth = factor(tree_depth), num_comp = paste("num_comp =", num_comp), num_comp = fct_inorder(num_comp)) ...
/exercises/solution_04_13.R
permissive
snowdj/supervised-ML-case-studies-course
R
false
false
527
r
library(tidyverse) library(tidymodels) tree_res <- readRDS("data/c4_tree_res.rds") tree_metrics <- tree_res %>% collect_metrics() glimpse(tree_metrics) tree_metrics %>% mutate(tree_depth = factor(tree_depth), num_comp = paste("num_comp =", num_comp), num_comp = fct_inorder(num_comp)) ...
#' fitSignatures #' @description Find nonnegative linear combination of mutation signatures to reconstruct matrix and #' calculate cosine similarity based on somatic SNVs. #' #' @param tri_matrix A matrix or a list of matrix generated by \code{\link{triMatrix}} function. #' @param patient.id Select the specific pati...
/R/fitSignatures.R
permissive
yuanjingnan/MesKit
R
false
false
11,101
r
#' fitSignatures #' @description Find nonnegative linear combination of mutation signatures to reconstruct matrix and #' calculate cosine similarity based on somatic SNVs. #' #' @param tri_matrix A matrix or a list of matrix generated by \code{\link{triMatrix}} function. #' @param patient.id Select the specific pati...
library(regts) csv_file <- "csv/example2.csv" ts1 <- read_ts_csv(csv_file, skipcol = 1, strict = FALSE) print(ts1) ts2 <- read_ts_csv(csv_file, skipcol = 1, labels = "after", strict = FALSE) print(ts2) View(ts2) ts3 <- read_ts_csv(csv_file, skipcol = 1, labels = "before", strict = FALSE) print(ts3) View(ts3)
/examples/read_ts/example2.R
no_license
timemod/regts
R
false
false
314
r
library(regts) csv_file <- "csv/example2.csv" ts1 <- read_ts_csv(csv_file, skipcol = 1, strict = FALSE) print(ts1) ts2 <- read_ts_csv(csv_file, skipcol = 1, labels = "after", strict = FALSE) print(ts2) View(ts2) ts3 <- read_ts_csv(csv_file, skipcol = 1, labels = "before", strict = FALSE) print(ts3) View(ts3)
# loading packages # fix txdb seqlevels library(ChIPseeker) library(TxDb.Athaliana.BioMart.plantsmart28) library(clusterProfiler) library(bedr) library(UpSetR) input_file_1 <- "treat_A.narrowPeak.bed" input_file_2 <- "treat_B.narrowPeak.bed" input_file_3 <- "treat_C.narrowPeak.bed" files <- c(input_file_1, input_file...
/ACR_annotation/peak_annotation.R
no_license
slt666666/Plant_Innate_Immunity_ATAC-seq
R
false
false
2,120
r
# loading packages # fix txdb seqlevels library(ChIPseeker) library(TxDb.Athaliana.BioMart.plantsmart28) library(clusterProfiler) library(bedr) library(UpSetR) input_file_1 <- "treat_A.narrowPeak.bed" input_file_2 <- "treat_B.narrowPeak.bed" input_file_3 <- "treat_C.narrowPeak.bed" files <- c(input_file_1, input_file...
exp_P_160408 <- read.csv("~/Dropbox/Sonnhammer_group/Data/GeneSPIDER/B.subtilis/exp_P_160408.csv", row.names=1) exp_P_160406 <- read.csv("~/Dropbox/Sonnhammer_group/Data/GeneSPIDER/B.subtilis/exp_P_160406.csv", header=FALSE) aa<-data.frame(exp_P_160408) bb<-data.frame(exp_P_160406) #index1<-pmatch(bb[,1],noquote(rowna...
/formPmatrix.r
permissive
dcolinmorgan/R
R
false
false
564
r
exp_P_160408 <- read.csv("~/Dropbox/Sonnhammer_group/Data/GeneSPIDER/B.subtilis/exp_P_160408.csv", row.names=1) exp_P_160406 <- read.csv("~/Dropbox/Sonnhammer_group/Data/GeneSPIDER/B.subtilis/exp_P_160406.csv", header=FALSE) aa<-data.frame(exp_P_160408) bb<-data.frame(exp_P_160406) #index1<-pmatch(bb[,1],noquote(rowna...
install.packages("devtools") library("devtools") install_version("assertthat", version = "0.2.1", type = "source", upgrade_dependencies = FALSE) install_version("AUC", version = "0.3.0", type = "source", upgrade_dependencies = FALSE) install_version("base64enc", version = "0.1-3", type = "source", upgrade_dependencies...
/libs/libs_1.r
no_license
odysseusinc/DockerEnv
R
false
false
2,185
r
install.packages("devtools") library("devtools") install_version("assertthat", version = "0.2.1", type = "source", upgrade_dependencies = FALSE) install_version("AUC", version = "0.3.0", type = "source", upgrade_dependencies = FALSE) install_version("base64enc", version = "0.1-3", type = "source", upgrade_dependencies...
################################################### ### code chunk number 34: Cs31_like.kem.degen ################################################### dat.short <- dat[1:4, 1:10] kem.degen <- MARSS(dat.short, control = list(allow.degen = FALSE))
/inst/userguide/figures/QE--Cs31_like.kem.degen.R
permissive
nwfsc-timeseries/MARSS
R
false
false
247
r
################################################### ### code chunk number 34: Cs31_like.kem.degen ################################################### dat.short <- dat[1:4, 1:10] kem.degen <- MARSS(dat.short, control = list(allow.degen = FALSE))
\name{surface.surface} \title{ Plots a surface } \usage{ surface.surface(obj, lab=NA, type="b", zlab, xlab, ylab, \dots) } \arguments{ \item{obj}{ An object from a fit, for example a tps, krig, or nnreg object. Object can also be of class surface from a predict.surface function. } \item{lab}{ Axes labels } \item{type}...
/man/surface.surface.Rd
no_license
cran/funfits
R
false
false
1,016
rd
\name{surface.surface} \title{ Plots a surface } \usage{ surface.surface(obj, lab=NA, type="b", zlab, xlab, ylab, \dots) } \arguments{ \item{obj}{ An object from a fit, for example a tps, krig, or nnreg object. Object can also be of class surface from a predict.surface function. } \item{lab}{ Axes labels } \item{type}...
##################### # # # Setup # # # ##################### #load up the ggmap library library(ggmap) library(RJSONIO) library(RCurl) # setting working directory setwd("/Users/yohkawano/Box Sync/IDRE/geocoder") # keys keys <- c("AIzaSyCzlOtcG6jSWDCjSgNtu_SyS55lD6OVyiA","AIzaSyDoLPlrxrTOpULEmdE0A6m9h-X7...
/geocoder4.R
no_license
yohman/R-Geocoder
R
false
false
4,605
r
##################### # # # Setup # # # ##################### #load up the ggmap library library(ggmap) library(RJSONIO) library(RCurl) # setting working directory setwd("/Users/yohkawano/Box Sync/IDRE/geocoder") # keys keys <- c("AIzaSyCzlOtcG6jSWDCjSgNtu_SyS55lD6OVyiA","AIzaSyDoLPlrxrTOpULEmdE0A6m9h-X7...
# - Functions related to correlation between the variables, clustering etc. proj_dists <- function(projs, distfun) { d_mat <- matrix(NA, length(projs), length(projs), dimnames = list(names(projs), names(projs))) sapply(projs, function(p1) { sapply(projs, function(p2) { distfun(p1, p2) }) }) } hc2a...
/R/corr.R
permissive
paasim/shinyproj
R
false
false
3,140
r
# - Functions related to correlation between the variables, clustering etc. proj_dists <- function(projs, distfun) { d_mat <- matrix(NA, length(projs), length(projs), dimnames = list(names(projs), names(projs))) sapply(projs, function(p1) { sapply(projs, function(p2) { distfun(p1, p2) }) }) } hc2a...
##==============================================# ## Author: Guido Espana ## Simulate COVID-19 in WA ## Year: 2019 ##==============================================# ## User's input---------------- ##==============================================# set.seed(123456) library(pomp) library(lubridate) library(tidyverse) libr...
/analysis/experiments_colombia/Bogota_simulations/scripts/submit_fred_school_visualization.R
no_license
confunguido/manuscript_bogota_school_reopening
R
false
false
38,034
r
##==============================================# ## Author: Guido Espana ## Simulate COVID-19 in WA ## Year: 2019 ##==============================================# ## User's input---------------- ##==============================================# set.seed(123456) library(pomp) library(lubridate) library(tidyverse) libr...
" Name : c9_02_code_tree_titanic.R Book : Hands-on Data Science with Anaconda ) Publisher: Packt Publishing Ltd. Author : Yuxing Yan and James Yan Date : 4/6/2018 email : yany@canisius.edu paulyxy@hotmail.com " building <- TRUE scoring <- ! building # A pre-defined value is...
/Chapter09/c9_02_code_tree_tinatic.R
permissive
andrewjcoxon/Hands-On-Data-Science-with-Anaconda
R
false
false
2,383
r
" Name : c9_02_code_tree_titanic.R Book : Hands-on Data Science with Anaconda ) Publisher: Packt Publishing Ltd. Author : Yuxing Yan and James Yan Date : 4/6/2018 email : yany@canisius.edu paulyxy@hotmail.com " building <- TRUE scoring <- ! building # A pre-defined value is...
profilelike.polr <- function(formula, data, profile.theta, method="logistic", lo.theta=NULL, hi.theta=NULL, length=300, round=2, subset=NULL, weights=NULL, offset=NULL, ...){ if(!is.null(subset)){ stop("Warning message: 'subset' should not be provided") } if(!is.null(weights)){ stop("Warning message: 'weights' s...
/ProfileLikelihood/R/profilelike.polr.R
no_license
ingted/R-Examples
R
false
false
1,580
r
profilelike.polr <- function(formula, data, profile.theta, method="logistic", lo.theta=NULL, hi.theta=NULL, length=300, round=2, subset=NULL, weights=NULL, offset=NULL, ...){ if(!is.null(subset)){ stop("Warning message: 'subset' should not be provided") } if(!is.null(weights)){ stop("Warning message: 'weights' s...
## human arrested embryo and mouse diapause embryo ## human: arrested vs 8C ## mouse: diapause vs E4.5 rm(list = rm()) library(tidyverse) # human data h_mat <- read.table("../human_arrested/data/norm_input.tsv", sep = "\t", row.names = 1, header = T) h_8c <- h_mat %>% select(colnames(h_m...
/cross-species/1.getmat.R
no_license
xscapintime/crspecies_RNAseq-analysis
R
false
false
1,341
r
## human arrested embryo and mouse diapause embryo ## human: arrested vs 8C ## mouse: diapause vs E4.5 rm(list = rm()) library(tidyverse) # human data h_mat <- read.table("../human_arrested/data/norm_input.tsv", sep = "\t", row.names = 1, header = T) h_8c <- h_mat %>% select(colnames(h_m...
/mm_municipio_m_ts.R
no_license
demusis/covid19_mt
R
false
false
23,010
r
#Problem 1 library(car) setwd("~/Downloads") teach<-read.csv('teach.csv',header = T) attach(teach) setwd("~/Desktop") png('picture1.png') scatterplot(salary~months|sex, data = teach, main = 'Salary vs. the Number of Months in service', xlab = 'months', ylab = 'salary', legend.plot = TRUE, lab...
/王泽宇 homework.R
no_license
MVP1218/Microeconometrics
R
false
false
4,627
r
#Problem 1 library(car) setwd("~/Downloads") teach<-read.csv('teach.csv',header = T) attach(teach) setwd("~/Desktop") png('picture1.png') scatterplot(salary~months|sex, data = teach, main = 'Salary vs. the Number of Months in service', xlab = 'months', ylab = 'salary', legend.plot = TRUE, lab...
#### Preamble #### # Purpose: The purpose of this code is to clean-up the 2017 GSS data obtained # from the U of T library. That data is available to U of T students, but it needs # to be put into a tidy format before it can be analysed. This code does that. # The main issue is that the data are released with codes f...
/gss_cleaning.R
no_license
huiyilu99/304finalproject
R
false
false
12,368
r
#### Preamble #### # Purpose: The purpose of this code is to clean-up the 2017 GSS data obtained # from the U of T library. That data is available to U of T students, but it needs # to be put into a tidy format before it can be analysed. This code does that. # The main issue is that the data are released with codes f...
#' @title Plot dendrogram of patient groups based on symptoms. #' #' @description Plots a dendrogram of patient groups based on symptom values they #' have. #' #' @param data Data fram to be passed to the function. #' @param variableName The column name of the variable used for filtering. #' @param variableVal...
/R/PlotSymptomsTabClustering.R
no_license
crtahlin/medplot
R
false
false
3,176
r
#' @title Plot dendrogram of patient groups based on symptoms. #' #' @description Plots a dendrogram of patient groups based on symptom values they #' have. #' #' @param data Data fram to be passed to the function. #' @param variableName The column name of the variable used for filtering. #' @param variableVal...
#' @exportClass tiledb_ctx setClass("tiledb_ctx", slots = list(ptr = "externalptr")) #' Creates a `tiledb_ctx` object #' #' @param config (optonal) character vector of config parameter names, values #' @return `tiledb_ctx` object #' @examples #' # default configuration #' ctx <- tiledb_ctx() #' #' # optionall...
/R/Ctx.R
permissive
fabbondanza/TileDB-R
R
false
false
2,055
r
#' @exportClass tiledb_ctx setClass("tiledb_ctx", slots = list(ptr = "externalptr")) #' Creates a `tiledb_ctx` object #' #' @param config (optonal) character vector of config parameter names, values #' @return `tiledb_ctx` object #' @examples #' # default configuration #' ctx <- tiledb_ctx() #' #' # optionall...
############Problem 1############# Auto=read.csv ("Auto.csv") fix(Auto) Auto=read.csv ("Auto.csv", header =T,na.strings ="?") fix(Auto) dim(Auto) Auto=na.omit(Auto) dim(Auto) names(Auto) head(Auto) attach(Auto) sapply(Auto, class) summary(Auto) Auto$origin <- factor(Auto$origin, levels=1:3, labels=c...
/Lab1.R
no_license
salehmfaisal/Different-project-and-assignmets-in-Machine-learning-with-R
R
false
false
2,552
r
############Problem 1############# Auto=read.csv ("Auto.csv") fix(Auto) Auto=read.csv ("Auto.csv", header =T,na.strings ="?") fix(Auto) dim(Auto) Auto=na.omit(Auto) dim(Auto) names(Auto) head(Auto) attach(Auto) sapply(Auto, class) summary(Auto) Auto$origin <- factor(Auto$origin, levels=1:3, labels=c...
\name{gtm_gbf} \alias{gtm_gbf} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Calculates the output of Gaussian basis functions for a given set of input } \description{First the function computes matrix \eqn{(d_{ij})} of distances between centers of Gaussians given by \code{MU} and lat...
/man/gtm_gbf.Rd
no_license
cran/gtm
R
false
false
1,300
rd
\name{gtm_gbf} \alias{gtm_gbf} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Calculates the output of Gaussian basis functions for a given set of input } \description{First the function computes matrix \eqn{(d_{ij})} of distances between centers of Gaussians given by \code{MU} and lat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ml_nem.R \name{nem} \alias{nem} \title{Negative Eigenvalue Magnitude} \usage{ nem(x) } \description{ NEM == 0; data is euclidean NEM >> 0; far } \details{ Gram matrix -1/2 JD^2J be positive semidefinite == EUclidean } \examples{ ## use simple...
/man/nem.Rd
no_license
kisungyou/DAS
R
false
true
558
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ml_nem.R \name{nem} \alias{nem} \title{Negative Eigenvalue Magnitude} \usage{ nem(x) } \description{ NEM == 0; data is euclidean NEM >> 0; far } \details{ Gram matrix -1/2 JD^2J be positive semidefinite == EUclidean } \examples{ ## use simple...
#Getting and Cleaning Data Course Project - JHU - ALVARO LOZANO ALONSO library(dplyr) library(data.table) setwd("~/Documents/Dokumente - MacBook Air/Data Science with R - Johns Hopkins University/C3") X_test <- read.table("./UCI HAR Dataset/test/X_test.txt") y_test <- read.table("./UCI HAR Dataset/test/y_test.txt") X...
/run_analysis.R
no_license
alvarico509/JHU_DS_C3
R
false
false
2,336
r
#Getting and Cleaning Data Course Project - JHU - ALVARO LOZANO ALONSO library(dplyr) library(data.table) setwd("~/Documents/Dokumente - MacBook Air/Data Science with R - Johns Hopkins University/C3") X_test <- read.table("./UCI HAR Dataset/test/X_test.txt") y_test <- read.table("./UCI HAR Dataset/test/y_test.txt") X...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gdelt_event_gkg.R \name{get_codes_gkg_themes} \alias{get_codes_gkg_themes} \title{Retrieves GKG theme code book} \usage{ get_codes_gkg_themes(split_word_bank_codes = F) } \description{ Retrieves GKG theme code book } \examples{ get_codes_gkg_...
/man/get_codes_gkg_themes.Rd
no_license
raj0926/gdeltr2
R
false
true
332
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gdelt_event_gkg.R \name{get_codes_gkg_themes} \alias{get_codes_gkg_themes} \title{Retrieves GKG theme code book} \usage{ get_codes_gkg_themes(split_word_bank_codes = F) } \description{ Retrieves GKG theme code book } \examples{ get_codes_gkg_...
# Example: Obama's handling economy example resample.statistic <- function(data, size=200, replace = TRUE, fun.name) { draw <- sample(data, size, replace) pos.rate <- fun.name(draw)/size return(pos.rate) } # positive and negative rates sample.size <- 200 pos.response <...
/EDA/R_codes/AB_test_compare_proportions_simulation.R
no_license
atomWater/Infosys2019-DNA-NCSU
R
false
false
783
r
# Example: Obama's handling economy example resample.statistic <- function(data, size=200, replace = TRUE, fun.name) { draw <- sample(data, size, replace) pos.rate <- fun.name(draw)/size return(pos.rate) } # positive and negative rates sample.size <- 200 pos.response <...
library(EloChoice) ### Name: EloChoice-package ### Title: Preference Rating for Paired Visual Stimuli Based on Elo Ratings ### Aliases: EloChoice-package EloChoice ### Keywords: package ### ** Examples data(physical) res <- elochoice(winner = physical$Winner, loser = physical$Loser, runs = 2) summary(res) ratings(r...
/data/genthat_extracted_code/EloChoice/examples/EloChoice-package.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
343
r
library(EloChoice) ### Name: EloChoice-package ### Title: Preference Rating for Paired Visual Stimuli Based on Elo Ratings ### Aliases: EloChoice-package EloChoice ### Keywords: package ### ** Examples data(physical) res <- elochoice(winner = physical$Winner, loser = physical$Loser, runs = 2) summary(res) ratings(r...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_preparation.R \name{range01} \alias{range01} \title{Transform a variable into the [0-1] range} \usage{ range01(var) } \arguments{ \item{var}{numeric input vector} } \value{ vector with the values scaled into the 0 to 1 range } \descripti...
/man/range01.Rd
permissive
pablo14/funModeling
R
false
true
482
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_preparation.R \name{range01} \alias{range01} \title{Transform a variable into the [0-1] range} \usage{ range01(var) } \arguments{ \item{var}{numeric input vector} } \value{ vector with the values scaled into the 0 to 1 range } \descripti...
#------------------------------------------------- #------------------------------------------------- #Cross Sectional Models - KFW #Testing in Cross Section the impact of being treated EVER vs. not being treated #On the Mean Level of NDVI, measured as a change in the level of NDVI between start and end year (1995-2010...
/KFW_CrossSectionResults_Mean_EverNever.R
no_license
ash-venkat/KFW_Amazon
R
false
false
9,581
r
#------------------------------------------------- #------------------------------------------------- #Cross Sectional Models - KFW #Testing in Cross Section the impact of being treated EVER vs. not being treated #On the Mean Level of NDVI, measured as a change in the level of NDVI between start and end year (1995-2010...
library(readxl) library(data.table) library(ggplot2) kody <- data.table(read_excel("Kopia Kody_stacji_pomiarowych.xlsx")) PM10 <- fread("2017/2017_PM10_24g.csv",sep = ";",dec = ",") PM25 <- fread("2017/2017_PM25_24g.csv",sep = ";",dec = ",") wwa_kody <- kody[MIEJSCOWOSC=="Warszawa", `KOD NOWY`] krk_kody <- kody[MI...
/PraceDomowe/PD7/gr2/WojciechBogucki/dane.R
no_license
Siemashko/TechnikiWizualizacjiDanych2018
R
false
false
1,391
r
library(readxl) library(data.table) library(ggplot2) kody <- data.table(read_excel("Kopia Kody_stacji_pomiarowych.xlsx")) PM10 <- fread("2017/2017_PM10_24g.csv",sep = ";",dec = ",") PM25 <- fread("2017/2017_PM25_24g.csv",sep = ";",dec = ",") wwa_kody <- kody[MIEJSCOWOSC=="Warszawa", `KOD NOWY`] krk_kody <- kody[MI...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_prep.R \name{back_calc_missing_flows} \alias{back_calc_missing_flows} \title{back_calc_missing_flows} \usage{ back_calc_missing_flows(x, compute_from = "i") } \arguments{ \item{x}{tibble of s, i, r in water weeks} \item{compute_from}{va...
/man/back_calc_missing_flows.Rd
permissive
gooood-night/horizon
R
false
true
496
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_prep.R \name{back_calc_missing_flows} \alias{back_calc_missing_flows} \title{back_calc_missing_flows} \usage{ back_calc_missing_flows(x, compute_from = "i") } \arguments{ \item{x}{tibble of s, i, r in water weeks} \item{compute_from}{va...
library(ggplot2) library(plyr) library(grid) # unit() this_base <- "fig04-20_carbon-dioxide-data-month-plot" co2_trim <- window(co2, c(1959, 1), c(1990, 12)) fit <- stl(co2_trim, s.window = 20, t.window = 20) my_data <- data.frame( month = factor(1:12, labels = month.abb), x = time(fit$time.series), fit$time....
/B_analysts_sources_github/jennybc/r-graph-catalog/fig04-20_carbon-dioxide-data-month-plot.R
no_license
Irbis3/crantasticScrapper
R
false
false
1,111
r
library(ggplot2) library(plyr) library(grid) # unit() this_base <- "fig04-20_carbon-dioxide-data-month-plot" co2_trim <- window(co2, c(1959, 1), c(1990, 12)) fit <- stl(co2_trim, s.window = 20, t.window = 20) my_data <- data.frame( month = factor(1:12, labels = month.abb), x = time(fit$time.series), fit$time....
#' Read ED2 variables #' #' @param path path to the h5 files folder generated by ED2 #' @param sites site(s) or prefix(es) #' @param type Q, T, D, etc. #' @param variables variables to read in, as defined by the names in the h5 files #' @param include_units include units description? #' @param verbose (optional) echo's...
/R/readVar.ED2.r
no_license
yangxhcaf/dgvmTools-1
R
false
false
4,364
r
#' Read ED2 variables #' #' @param path path to the h5 files folder generated by ED2 #' @param sites site(s) or prefix(es) #' @param type Q, T, D, etc. #' @param variables variables to read in, as defined by the names in the h5 files #' @param include_units include units description? #' @param verbose (optional) echo's...
ggplot(diamonds, aes(carat, price)) + geom_point() ggplot() + geom_point(aes(carat, price), diamonds) ggplot(diamonds) + geom_point(aes(carat, price)) ggplot(diamonds, aes(carat)) + geom_point(aes(y = price)) plot(price~carat, data=diamonds) qplot(carat, price, data=diamonds) ggplot(diamonds, aes(carat, price)) + g...
/resources/democodes.R
no_license
SayidShen/prelim
R
false
false
2,193
r
ggplot(diamonds, aes(carat, price)) + geom_point() ggplot() + geom_point(aes(carat, price), diamonds) ggplot(diamonds) + geom_point(aes(carat, price)) ggplot(diamonds, aes(carat)) + geom_point(aes(y = price)) plot(price~carat, data=diamonds) qplot(carat, price, data=diamonds) ggplot(diamonds, aes(carat, price)) + g...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/zchunk_L221.en_supply.R \name{module_energy_L221.en_supply} \alias{module_energy_L221.en_supply} \title{module_energy_L221.en_supply} \usage{ module_energy_L221.en_supply(command, ...) } \arguments{ \item{command}{API command to execute} \it...
/man/module_energy_L221.en_supply.Rd
permissive
Liyang-Guo/gcamdata
R
false
true
1,942
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/zchunk_L221.en_supply.R \name{module_energy_L221.en_supply} \alias{module_energy_L221.en_supply} \title{module_energy_L221.en_supply} \usage{ module_energy_L221.en_supply(command, ...) } \arguments{ \item{command}{API command to execute} \it...
rm(list = ls()) #setwd("~/Documents/shiny_nohrsc/final") setwd("~/R/proj/nohrsc/shiny/final") source("libs.r") source("fun_defs.r") #setwd("~/Documents/shiny_nohrsc/final/data") setwd("~/R/proj/nohrsc/shiny/final/data") dowy <- as.data.frame(fread("daily_dowy.csv")) nwscode_to_rivgroup <- as.data.frame(f...
/shiny/final/df_build.r
no_license
dbo99/19nohrsc
R
false
false
2,152
r
rm(list = ls()) #setwd("~/Documents/shiny_nohrsc/final") setwd("~/R/proj/nohrsc/shiny/final") source("libs.r") source("fun_defs.r") #setwd("~/Documents/shiny_nohrsc/final/data") setwd("~/R/proj/nohrsc/shiny/final/data") dowy <- as.data.frame(fread("daily_dowy.csv")) nwscode_to_rivgroup <- as.data.frame(f...
### The following code is based on algorithms noted in Murphy, 2012 Probabilistic Machine Learning. ### Specifically, Chapter 11, section 4. ############################### ### EM for gaussian mixture ### ############################### gaussmixEM = function(params, X, clusters = 2, tol=.00001, maxits=100, showits=T){...
/mix3.R
no_license
Rjacobucci/random_code
R
false
false
5,443
r
### The following code is based on algorithms noted in Murphy, 2012 Probabilistic Machine Learning. ### Specifically, Chapter 11, section 4. ############################### ### EM for gaussian mixture ### ############################### gaussmixEM = function(params, X, clusters = 2, tol=.00001, maxits=100, showits=T){...
#' @include joinLocEvent.R #' @include prepTaxa.R #' #' @title joinMicroSaplings: compiles sapling data collected in microplots #' #' @importFrom dplyr arrange filter full_join left_join select #' @importFrom magrittr %>% #' @importFrom tidyr pivot_wider #' #' @description This function compiles sapling data collected ...
/R/joinMicroSaplings.R
permissive
KateMMiller/forestMIDN
R
false
false
9,356
r
#' @include joinLocEvent.R #' @include prepTaxa.R #' #' @title joinMicroSaplings: compiles sapling data collected in microplots #' #' @importFrom dplyr arrange filter full_join left_join select #' @importFrom magrittr %>% #' @importFrom tidyr pivot_wider #' #' @description This function compiles sapling data collected ...
# loading the dslabs package and the murders dataset library(dslabs) data(murders) # determining that the murders dataset is of the "data frame" class class(murders) # finding out more about the structure of the object str(murders) # showing the first 6 lines of the dataset head(murders) class(murders) ...
/1.1.data-types.R
no_license
aslihanural/R-exercises
R
false
false
931
r
# loading the dslabs package and the murders dataset library(dslabs) data(murders) # determining that the murders dataset is of the "data frame" class class(murders) # finding out more about the structure of the object str(murders) # showing the first 6 lines of the dataset head(murders) class(murders) ...
I <- read.csv("data/I_data.csv", header = FALSE) S <- read.csv("data/S_data.csv",header = FALSE) labels <- read.csv("data/labels.csv", header = FALSE) loss <- read.csv("loss", header = FALSE) loss <- loss[,1] labels <- labels[,1] preds <- read.csv("preds", header = FALSE)[,1] losses <- 0.5*abs(preds-labels) pred_se = s...
/SIR/standard/stan_plots/SIR.R
no_license
thayerf/post-RNN
R
false
false
1,439
r
I <- read.csv("data/I_data.csv", header = FALSE) S <- read.csv("data/S_data.csv",header = FALSE) labels <- read.csv("data/labels.csv", header = FALSE) loss <- read.csv("loss", header = FALSE) loss <- loss[,1] labels <- labels[,1] preds <- read.csv("preds", header = FALSE)[,1] losses <- 0.5*abs(preds-labels) pred_se = s...
# Control structures: while loops #Example 1: While loops begin by testing condition, if its true, it will execute the loop body. count <- 0 while(count < 10) { print(count) count <- count+1 } #Example 2: While loops can test more than 1 condition ##This structure creates a loop till z arrives at less...
/R Programming Week 2/while-loops.R
no_license
CheeLoong/coursera-dss
R
false
false
552
r
# Control structures: while loops #Example 1: While loops begin by testing condition, if its true, it will execute the loop body. count <- 0 while(count < 10) { print(count) count <- count+1 } #Example 2: While loops can test more than 1 condition ##This structure creates a loop till z arrives at less...
# Script1.R 1+1 hist(rnorm(1000)) ## edit length of rnorm() as desired
/R/Script1.R
no_license
ds4ci/Git-Play
R
false
false
75
r
# Script1.R 1+1 hist(rnorm(1000)) ## edit length of rnorm() as desired
.ls.objects <- function (pos = 1, pattern, order.by, decreasing=FALSE, head=FALSE, n=5) { napply <- function(names, fn) sapply(names, function(x) fn(get(x, pos = pos))) names <- ls(pos = pos, pattern = pattern) obj.class <- napply(names, function(x) as.character(class(x))[1]) obj.m...
/Analyse/RCode/fn_lsos.R
no_license
tonyjward/trends-in-data-science
R
false
false
1,127
r
.ls.objects <- function (pos = 1, pattern, order.by, decreasing=FALSE, head=FALSE, n=5) { napply <- function(names, fn) sapply(names, function(x) fn(get(x, pos = pos))) names <- ls(pos = pos, pattern = pattern) obj.class <- napply(names, function(x) as.character(class(x))[1]) obj.m...
#!/bin/env Rscript # #$ -cwd #$ -pe smp 6 #$ -l mem_free=24G # # #$ -S /hpc/apps/R/4.0.2/bin/Rscript #$ -e /common/dabkek/re-NewAcquisition/primary_imputation/mapDIA/mapDIA_noimp_results_SDF2_minobs_1/scratch #$ -o /common/dabkek/re-NewAcquisition/primary_imputation/mapDIA/mapDIA_noimp_results_SDF2_minobs_1/scratch ...
/null_rots_script_IMP_group2.R
no_license
Kdabke/imputation-proteomics
R
false
false
2,715
r
#!/bin/env Rscript # #$ -cwd #$ -pe smp 6 #$ -l mem_free=24G # # #$ -S /hpc/apps/R/4.0.2/bin/Rscript #$ -e /common/dabkek/re-NewAcquisition/primary_imputation/mapDIA/mapDIA_noimp_results_SDF2_minobs_1/scratch #$ -o /common/dabkek/re-NewAcquisition/primary_imputation/mapDIA/mapDIA_noimp_results_SDF2_minobs_1/scratch ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summary.R \name{summary.RoBMA} \alias{summary.RoBMA} \title{Summarize fitted RoBMA object} \usage{ \method{summary}{RoBMA}( object, type = "ensemble", conditional = FALSE, output_scale = NULL, probs = c(0.025, 0.975), logBF = FALS...
/man/summary.RoBMA.Rd
no_license
JorisGoosen/RoBMA
R
false
true
2,969
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summary.R \name{summary.RoBMA} \alias{summary.RoBMA} \title{Summarize fitted RoBMA object} \usage{ \method{summary}{RoBMA}( object, type = "ensemble", conditional = FALSE, output_scale = NULL, probs = c(0.025, 0.975), logBF = FALS...
library(shiny) library(plotly) # Define server logic for application shinyServer(function(input, output) { output$plot <- renderPlot({ a = diamonds[which(diamonds$cut == input$cut),] ggplot(data=a) + geom_histogram(binwidth=100, aes(x=a$price)) + xlab("Diamond Price U$") + ylab("Freque...
/server.R
no_license
nghiasoft/c9w4
R
false
false
685
r
library(shiny) library(plotly) # Define server logic for application shinyServer(function(input, output) { output$plot <- renderPlot({ a = diamonds[which(diamonds$cut == input$cut),] ggplot(data=a) + geom_histogram(binwidth=100, aes(x=a$price)) + xlab("Diamond Price U$") + ylab("Freque...
#' @title Identify cluster with the most variability #' #' @description Identifies the most variable cluster based on the mean trajectory #' of each cluster. This cluster is identified for the purpose of illustration #' in an rmarkdown file. #' #' @param time_object A timeseries object #' @param mean_ts_data A datafram...
/R/rmarkdown_functions.R
permissive
Ylefol/TimeSeriesAnalysis
R
false
false
4,455
r
#' @title Identify cluster with the most variability #' #' @description Identifies the most variable cluster based on the mean trajectory #' of each cluster. This cluster is identified for the purpose of illustration #' in an rmarkdown file. #' #' @param time_object A timeseries object #' @param mean_ts_data A datafram...
# Reviewing "Disappearing" expenditure from subsequent PUDRs. cod = fread("J:/Project/Evaluation/GF/resource_tracking/_gf_files_gos/cod/visualizations/cod_negative_expenditure.csv") sen = fread("J:/Project/Evaluation/GF/resource_tracking/_gf_files_gos/sen/visualizations/sen_negative_expenditure.csv") uga = fread("J:/...
/resource_tracking/archive/review_disappearing_expenditure.r
no_license
ihmeuw/gf
R
false
false
982
r
# Reviewing "Disappearing" expenditure from subsequent PUDRs. cod = fread("J:/Project/Evaluation/GF/resource_tracking/_gf_files_gos/cod/visualizations/cod_negative_expenditure.csv") sen = fread("J:/Project/Evaluation/GF/resource_tracking/_gf_files_gos/sen/visualizations/sen_negative_expenditure.csv") uga = fread("J:/...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Methods-accessors.R \name{fastq} \alias{fastq} \title{Extract fastq slot} \usage{ fastq(x) } \arguments{ \item{x}{Object of class \code{\linkS4class{Fast5Summary}}} } \value{ A ShortReadQ object } \description{ This generic function accesses ...
/man/fastq.Rd
no_license
grimbough/IONiseR
R
false
true
523
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Methods-accessors.R \name{fastq} \alias{fastq} \title{Extract fastq slot} \usage{ fastq(x) } \arguments{ \item{x}{Object of class \code{\linkS4class{Fast5Summary}}} } \value{ A ShortReadQ object } \description{ This generic function accesses ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assoc.R \name{meta} \alias{meta} \title{CNV meta-analysis for one or more loci} \usage{ meta( stats.merged, cohorts, model = "fe", saddle = T, adjust.biobanks = F, cohort.inflation = NULL, probe.counts = NULL, saddle.exclusion...
/source/rCNV2/man/meta.Rd
permissive
talkowski-lab/rCNV2
R
false
true
2,743
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/assoc.R \name{meta} \alias{meta} \title{CNV meta-analysis for one or more loci} \usage{ meta( stats.merged, cohorts, model = "fe", saddle = T, adjust.biobanks = F, cohort.inflation = NULL, probe.counts = NULL, saddle.exclusion...
retweety <- function(katalog, data, data_pob, liczba){ library(twitteR) library(stringi) consumerKey <- "mruTEgk5DpvU0XM8dk3aPRhVx" consumerSecret <- "B2NOHpA7uVrap95LOwTssStx8HfWUgSDbtTo0OJhQrXQEmi1oT" access_token <- "51761035-QqJMM7EYxwwV5QnGAelnEq6HVg6RQrUYOFMyw9pho" access_secret <- "Fte...
/MINI_2015/wybory/faza 2/faza2_Rudas_Wasniewski_Pytlak/ofic_tweety_retweety.R
no_license
smudap/RandBigData
R
false
false
5,358
r
retweety <- function(katalog, data, data_pob, liczba){ library(twitteR) library(stringi) consumerKey <- "mruTEgk5DpvU0XM8dk3aPRhVx" consumerSecret <- "B2NOHpA7uVrap95LOwTssStx8HfWUgSDbtTo0OJhQrXQEmi1oT" access_token <- "51761035-QqJMM7EYxwwV5QnGAelnEq6HVg6RQrUYOFMyw9pho" access_secret <- "Fte...
library(shiny) shinyServer(function(input, output) { output$out1 <- renderText(input$box1) output$out2 <- renderText(input$box2) output$out3 <- renderText(input$box3) })
/R/Scripts/Shiny/example4_advanced_ui/server.R
no_license
tdworowy/Data_science_notes
R
false
false
188
r
library(shiny) shinyServer(function(input, output) { output$out1 <- renderText(input$box1) output$out2 <- renderText(input$box2) output$out3 <- renderText(input$box3) })
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/no_overlapping_cronjobs.R \name{no_overlapping_cronjobs} \alias{no_overlapping_cronjobs} \title{No Overlapping Crong Jobs} \usage{ no_overlapping_cronjobs() } \description{ Avoids overlapping cron jobs using a PID-file method.\cr Usage: inser...
/man/no_overlapping_cronjobs.Rd
permissive
rebordao/myrutils
R
false
true
461
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/no_overlapping_cronjobs.R \name{no_overlapping_cronjobs} \alias{no_overlapping_cronjobs} \title{No Overlapping Crong Jobs} \usage{ no_overlapping_cronjobs() } \description{ Avoids overlapping cron jobs using a PID-file method.\cr Usage: inser...
library(mongolite) library(dplyr) library(lubridate) # Establecemos el wd wd <- "~/Documentos/FCiencias/2021-1/BEDU/Fase_2/Sesion_7" setwd(wd) rm(wd) # Cargamos la base y la guardamos para despues subirla a MongoDB y para # contrastar con la sintaxis de MongoDB url <- "https://raw.githubusercontent.com/beduExpert/Pro...
/Sesion7/Postwork_7.R
no_license
setjaf/BeduEquipo20Postwork
R
false
false
3,045
r
library(mongolite) library(dplyr) library(lubridate) # Establecemos el wd wd <- "~/Documentos/FCiencias/2021-1/BEDU/Fase_2/Sesion_7" setwd(wd) rm(wd) # Cargamos la base y la guardamos para despues subirla a MongoDB y para # contrastar con la sintaxis de MongoDB url <- "https://raw.githubusercontent.com/beduExpert/Pro...
source( "masternegloglikereduced1.R" ) source("eudicottree.R" ) library( "expm" ) source( "Qmatrixwoodherb3.R" ) source("Pruning2.R") bichrom.dataset<-read.table( "eudicotvals.txt",header=FALSE,sep=",",stringsAsFactors=FALSE) last.state=50 uniform.samples<-read.csv("sample262.csv",header=FALSE) a<- as.numeric(t(unif...
/Reduced model optimizations/explorelikereduced262.R
no_license
roszenil/Bichromdryad
R
false
false
750
r
source( "masternegloglikereduced1.R" ) source("eudicottree.R" ) library( "expm" ) source( "Qmatrixwoodherb3.R" ) source("Pruning2.R") bichrom.dataset<-read.table( "eudicotvals.txt",header=FALSE,sep=",",stringsAsFactors=FALSE) last.state=50 uniform.samples<-read.csv("sample262.csv",header=FALSE) a<- as.numeric(t(unif...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cloudwatch_operations.R \name{cloudwatch_put_metric_data} \alias{cloudwatch_put_metric_data} \title{Publishes metric data points to Amazon CloudWatch} \usage{ cloudwatch_put_metric_data(Namespace, MetricData) } \arguments{ \item{Namespace}{[r...
/cran/paws.management/man/cloudwatch_put_metric_data.Rd
permissive
johnnytommy/paws
R
false
true
3,863
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cloudwatch_operations.R \name{cloudwatch_put_metric_data} \alias{cloudwatch_put_metric_data} \title{Publishes metric data points to Amazon CloudWatch} \usage{ cloudwatch_put_metric_data(Namespace, MetricData) } \arguments{ \item{Namespace}{[r...
# Fit the data from a single sheet # Conducts a grid search of possible parameter values # For Ed's model source("R/fit_funs.R") source("R/model_functions.R") source("R/readUCD.R") f = "data/UCD_WCA2002.xls" d = readExp(f) d = lapply(d, deltaFEV1) numIntervals = 50 dos = seq(5, 2500, length.out = numIntervals) #dos...
/scripts/gridSearch.R
no_license
dsidavis/Ozone
R
false
false
777
r
# Fit the data from a single sheet # Conducts a grid search of possible parameter values # For Ed's model source("R/fit_funs.R") source("R/model_functions.R") source("R/readUCD.R") f = "data/UCD_WCA2002.xls" d = readExp(f) d = lapply(d, deltaFEV1) numIntervals = 50 dos = seq(5, 2500, length.out = numIntervals) #dos...
library(dismo) library(ENMeval) # Function to run SDMS and choose the model parameters that make the best model # selected by AIC as long as AUC > 0.7. If AUC is <0.7, then select top AUC? generate_ENMeval <- function(occ_df, model_vars, partitionMethod, ...
/sdmPipelineScripts/scripts/06_generate_ENMevals.R
no_license
mbelitz/Nearctic_Odonata_Diversity
R
false
false
2,047
r
library(dismo) library(ENMeval) # Function to run SDMS and choose the model parameters that make the best model # selected by AIC as long as AUC > 0.7. If AUC is <0.7, then select top AUC? generate_ENMeval <- function(occ_df, model_vars, partitionMethod, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gis_analysis.R \name{wbt_reclass} \alias{wbt_reclass} \title{Reclass} \usage{ wbt_reclass(input, output, reclass_vals, assign_mode = FALSE, verbose_mode = FALSE) } \arguments{ \item{input}{Input raster file.} \item{output}{Output raster fi...
/man/wbt_reclass.Rd
permissive
Remote-Sensing-Forks/whiteboxR
R
false
true
813
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gis_analysis.R \name{wbt_reclass} \alias{wbt_reclass} \title{Reclass} \usage{ wbt_reclass(input, output, reclass_vals, assign_mode = FALSE, verbose_mode = FALSE) } \arguments{ \item{input}{Input raster file.} \item{output}{Output raster fi...
#' @title Over Sampling for Time Series Classification #' @description Oversample a univariate, multi-modal time series sequence of imbalanced classified data. #' @details This function balances univariate imbalance time series data based on #' structure preserving oversampling. #' @references H. Cao, X.-L. Li, Y....
/R/OSTSC.R
no_license
cran/OSTSC
R
false
false
11,123
r
#' @title Over Sampling for Time Series Classification #' @description Oversample a univariate, multi-modal time series sequence of imbalanced classified data. #' @details This function balances univariate imbalance time series data based on #' structure preserving oversampling. #' @references H. Cao, X.-L. Li, Y....
maps_with_points <- function(which_model){ require(spdep) require(letsR) require(raster) r <- raster("~/Box Sync/colliding ranges/Simulations_humans/Functions/richnobuf.asc") plot(r) myWorld <- as.data.frame(which_model[[5]][1]) coords <- as.matrix(myWorld[, 2:3]) nbs <- knn2nb(knearneigh(coords, k = 7, longlat...
/Functions/PLOT_maps_with_points.R
no_license
BrunoVilela/Simulations_humans
R
false
false
3,280
r
maps_with_points <- function(which_model){ require(spdep) require(letsR) require(raster) r <- raster("~/Box Sync/colliding ranges/Simulations_humans/Functions/richnobuf.asc") plot(r) myWorld <- as.data.frame(which_model[[5]][1]) coords <- as.matrix(myWorld[, 2:3]) nbs <- knn2nb(knearneigh(coords, k = 7, longlat...
## startup setwd("~/Documents/redcap_in_r/Data meeting and cleaning/") source('~/Documents/github/UPMC/startup.R') ############startuptransfer############# rootdir="~/Box/skinner/data/Redcap Transfer/All protect data/neuropsych/" logdir="~/Documents/github/UPMC/TRANSFER/PT/dup_id/" # directory of folder to save duplica...
/Data meeting and cleaning/PT-date cleaning pipeline.R
no_license
DecisionNeurosciencePsychopathology/redcap_in_r
R
false
false
39,625
r
## startup setwd("~/Documents/redcap_in_r/Data meeting and cleaning/") source('~/Documents/github/UPMC/startup.R') ############startuptransfer############# rootdir="~/Box/skinner/data/Redcap Transfer/All protect data/neuropsych/" logdir="~/Documents/github/UPMC/TRANSFER/PT/dup_id/" # directory of folder to save duplica...
# Create data for the graph. x <- c(21, 62, 10, 53) labels <- c("London", "New York", "Singapore", "Mumbai") # Give the chart file a name. png(file = "city.png") # Plot the chart. pie(x,labels) # Save the file. dev.off()
/pie-charts.r
no_license
apuchakroborti/r-test
R
false
false
222
r
# Create data for the graph. x <- c(21, 62, 10, 53) labels <- c("London", "New York", "Singapore", "Mumbai") # Give the chart file a name. png(file = "city.png") # Plot the chart. pie(x,labels) # Save the file. dev.off()