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
#### THIS FILE CONTAINS ALL THE MODELS THAT ARE DONE IN RESPONSE TO SECOND ROUND OF REVIEW AT JOP #### #setwd("/media/dropbox/dropbox/Dropbox (MIT)/Documents/Works/Vietnam Elections/Data/Working Data") setwd("G:/Dropbox (MIT)/Documents/Works/Vietnam Elections/Data/Working Data") #setwd("D:/Dropbox (MIT)/Documents/Work...
/Code/Spring 2021/Models_Revision_2_JOP.R
no_license
mdtrinh/vietnam_elections
R
false
false
3,711
r
#### THIS FILE CONTAINS ALL THE MODELS THAT ARE DONE IN RESPONSE TO SECOND ROUND OF REVIEW AT JOP #### #setwd("/media/dropbox/dropbox/Dropbox (MIT)/Documents/Works/Vietnam Elections/Data/Working Data") setwd("G:/Dropbox (MIT)/Documents/Works/Vietnam Elections/Data/Working Data") #setwd("D:/Dropbox (MIT)/Documents/Work...
# Marc Edwards - BEACONs # Feb 10 2017 # Function to evaluate benchmark representation. # new version of denovoRep function used in NWB that can accept either a list of benchmarks matching the ranker input file, or a shp of polygons to be analysed using GIS tools. If both are provided the names should be unique and res...
/functions/benchmarkRep.R
no_license
edwardsmarc/tools-GUI
R
false
false
10,002
r
# Marc Edwards - BEACONs # Feb 10 2017 # Function to evaluate benchmark representation. # new version of denovoRep function used in NWB that can accept either a list of benchmarks matching the ranker input file, or a shp of polygons to be analysed using GIS tools. If both are provided the names should be unique and res...
#-------------------------------------------------------------------------------- # Tema: Ejercicio - 3 # Autor: Julio Cesar <jcms2665@gmail.com> # Fecha: 11-08-2021 # Datos: Shape de Estados, INEGI. # CONACYT (casos diarios): # https://datos.covid-19.conacyt.mx/#Dow...
/4 Mapas/4_3 Ejercicio.R
permissive
daniafigueroa/BUAP-R-2021
R
false
false
2,059
r
#-------------------------------------------------------------------------------- # Tema: Ejercicio - 3 # Autor: Julio Cesar <jcms2665@gmail.com> # Fecha: 11-08-2021 # Datos: Shape de Estados, INEGI. # CONACYT (casos diarios): # https://datos.covid-19.conacyt.mx/#Dow...
library(shiny) library(shinythemes) library(leaflet) library(dplyr) library(tidyverse) #library(DT) library(data.table) base.ind.dir <- "/media/modelsrv8d/opusgit/urbansim_data/data/psrc_parcel/runs" #base.ind.dir <- "/Volumes/d$/opusgit/urbansim_data/data/psrc_parcel/runs" #base.ind.dir <- "/Users/hana/d$/opusgit/urb...
/shiny/global.R
no_license
hanase/new_buildings
R
false
false
3,104
r
library(shiny) library(shinythemes) library(leaflet) library(dplyr) library(tidyverse) #library(DT) library(data.table) base.ind.dir <- "/media/modelsrv8d/opusgit/urbansim_data/data/psrc_parcel/runs" #base.ind.dir <- "/Volumes/d$/opusgit/urbansim_data/data/psrc_parcel/runs" #base.ind.dir <- "/Users/hana/d$/opusgit/urb...
library(magrittr) library(tidyverse) library(Seurat) library(readxl) library(cowplot) library(colorblindr) library(viridis) library(harmony) setwd(rprojroot::find_rstudio_root_file()) theme_cowplot2 <- function(...) { theme_cowplot(font_size = 12, ...) %+replace% theme(strip.background = element_blank(), ...
/_preprocessing/030_SPECTRUM_freeze_v7_fix_Ovarian.cancer.cell.super.R
no_license
shahcompbio/spectrum_tme
R
false
false
5,356
r
library(magrittr) library(tidyverse) library(Seurat) library(readxl) library(cowplot) library(colorblindr) library(viridis) library(harmony) setwd(rprojroot::find_rstudio_root_file()) theme_cowplot2 <- function(...) { theme_cowplot(font_size = 12, ...) %+replace% theme(strip.background = element_blank(), ...
#' Make a safe version of a function #' #' `safely()` wraps its input function, creating a new function that never #' throws an error. Instead, it returns an object of class `safely` which #' is a list with two components, `result` and `error`. One component is #' always null #' #' @param .f a function to wrap #' @expo...
/tidy-tools/safely/R/safely.R
no_license
gwendolynr/explore-libraries
R
false
false
866
r
#' Make a safe version of a function #' #' `safely()` wraps its input function, creating a new function that never #' throws an error. Instead, it returns an object of class `safely` which #' is a list with two components, `result` and `error`. One component is #' always null #' #' @param .f a function to wrap #' @expo...
################################################### ### Last Update: Dec. 6 2013 ################################################### setwd("/Users/elliotcohen/Dropbox/data/Electricity/CEA/Rcommands") library(xlsx) library(plyr) library(ggplot2) library(scales) library(gdata) library(chron) library(reshape2) ## Energy...
/r/archive/Sch-Drl-UI.R
no_license
denistanwh/Energy
R
false
false
48,133
r
################################################### ### Last Update: Dec. 6 2013 ################################################### setwd("/Users/elliotcohen/Dropbox/data/Electricity/CEA/Rcommands") library(xlsx) library(plyr) library(ggplot2) library(scales) library(gdata) library(chron) library(reshape2) ## Energy...
\name{Rdo_append_argument} \alias{Rdo_append_argument} \title{ Append an item for a new argument to an Rd object } \description{ Append an item for a new argument to an Rd object. } \usage{ Rdo_append_argument(rdo, argname, description = NA, indent = " ", create = FALSE) } \arguments{ \item{rdo}{an Rd object.} ...
/man/Rdo_append_argument.Rd
no_license
GeoBosh/Rdpack
R
false
false
1,689
rd
\name{Rdo_append_argument} \alias{Rdo_append_argument} \title{ Append an item for a new argument to an Rd object } \description{ Append an item for a new argument to an Rd object. } \usage{ Rdo_append_argument(rdo, argname, description = NA, indent = " ", create = FALSE) } \arguments{ \item{rdo}{an Rd object.} ...
#TITLE AND GOOAL OF THIS PROJECT # A pneumonia of unknown cause detected in Wuhan, China was reported from China # In this project we used a dataset from kaggle . #The goal of this project is to build out our skills and understanding of the data analysis workflow by evaluating the Covid19 situation through thi...
/Guided Project Investigating COVID-19 Virus Trends.R
no_license
oluwatosin17/Data-Structures-in-R
R
false
false
4,112
r
#TITLE AND GOOAL OF THIS PROJECT # A pneumonia of unknown cause detected in Wuhan, China was reported from China # In this project we used a dataset from kaggle . #The goal of this project is to build out our skills and understanding of the data analysis workflow by evaluating the Covid19 situation through thi...
# ui.R library(shiny) # Define UI for application that pre-process the data shinyUI(fluidPage( titlePanel("Data Pre-Processor"), sidebarLayout( sidebarPanel( helpText("This app lets you select one of 3 datasets from the UsingR library. Once the dataset is selected...
/ui.R
no_license
m3cinc/Shinyapps
R
false
false
2,394
r
# ui.R library(shiny) # Define UI for application that pre-process the data shinyUI(fluidPage( titlePanel("Data Pre-Processor"), sidebarLayout( sidebarPanel( helpText("This app lets you select one of 3 datasets from the UsingR library. Once the dataset is selected...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/blink_detect.R \name{blink_detect} \alias{blink_detect} \title{Take pupil file and detect blinks merge blinks with sample report} \usage{ blink_detect(samp) } \arguments{ \item{samp}{pupil data file} } \value{ merged data file with blinks det...
/man/blink_detect.Rd
no_license
dmirman/gazer
R
false
true
410
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/blink_detect.R \name{blink_detect} \alias{blink_detect} \title{Take pupil file and detect blinks merge blinks with sample report} \usage{ blink_detect(samp) } \arguments{ \item{samp}{pupil data file} } \value{ merged data file with blinks det...
## test of ranef() library(plm) data("Cigar", package = "plm") # note: the formulae used in estimation are different obj_bal_ind <- plm(sales ~ pop + price, data = Cigar, model = "random", effect = "individual") # gives positive estimate for theta obj_bal_time <- plm(price ~ pop + sales, data = Cigar, model = "...
/inst/tests/test_ranef.R
no_license
cran/plm
R
false
false
1,862
r
## test of ranef() library(plm) data("Cigar", package = "plm") # note: the formulae used in estimation are different obj_bal_ind <- plm(sales ~ pop + price, data = Cigar, model = "random", effect = "individual") # gives positive estimate for theta obj_bal_time <- plm(price ~ pop + sales, data = Cigar, model = "...
## makeCacheMatrix and cacheSolve functions are collaboratively ## implementing a caching functionality on calculating the inverse of a ## given invertible matrix and storing the results in a cached memory ## for recurring references. They should be called in sequence: ## First makeCacheMatrix is to be called. The...
/cachematrix.R
no_license
RaminReybod/ProgrammingAssignment2
R
false
false
3,472
r
## makeCacheMatrix and cacheSolve functions are collaboratively ## implementing a caching functionality on calculating the inverse of a ## given invertible matrix and storing the results in a cached memory ## for recurring references. They should be called in sequence: ## First makeCacheMatrix is to be called. The...
library(frbs) ### Name: frbsPMML ### Title: The frbsPMML generator ### Aliases: frbsPMML ### ** Examples ## This example shows how to construct a frbsPMML file of the frbs model ## Even though we are using MAMDANI model, other models have the same way ## ## 1. Produce frbs model, for example: we perform Wang & Mend...
/data/genthat_extracted_code/frbs/examples/frbsPMML.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,199
r
library(frbs) ### Name: frbsPMML ### Title: The frbsPMML generator ### Aliases: frbsPMML ### ** Examples ## This example shows how to construct a frbsPMML file of the frbs model ## Even though we are using MAMDANI model, other models have the same way ## ## 1. Produce frbs model, for example: we perform Wang & Mend...
numPerPatch337500 <- c(2519,2481)
/NatureEE-data-archive/Run203121/JAFSdata/JAFSnumPerPatch337500.R
no_license
flaxmans/NatureEE2017
R
false
false
34
r
numPerPatch337500 <- c(2519,2481)
## Prerequisite setup library(dplyr) f_name <- "Coursera_DS3_Final.zip" # Checking if archieve already exists. if (!file.exists(f_name)){ fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileURL, f_name, method="curl") } # Checking i...
/run_analysis.R
no_license
Neerajagar/C3W4
R
false
false
2,830
r
## Prerequisite setup library(dplyr) f_name <- "Coursera_DS3_Final.zip" # Checking if archieve already exists. if (!file.exists(f_name)){ fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileURL, f_name, method="curl") } # Checking i...
gmm_s_AIC <- function(y, X, Z, tune = F){ # _s indicates the structural equation # use "lars" to compute the path of the lasso solutions bhat <- gmm_s(y, X, Z) ##################### mAIC <- mIC(y, X, Z, bhat, "AIC") if (tune == F){ choice <- which.min(mAIC) } else { choice <- min( which.min(mA...
/gmm_iter.R
no_license
laaaarrywang/GMM-Lasso
R
false
false
2,192
r
gmm_s_AIC <- function(y, X, Z, tune = F){ # _s indicates the structural equation # use "lars" to compute the path of the lasso solutions bhat <- gmm_s(y, X, Z) ##################### mAIC <- mIC(y, X, Z, bhat, "AIC") if (tune == F){ choice <- which.min(mAIC) } else { choice <- min( which.min(mA...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nnrrBeregnIndikator.R \name{nnrrBeregnIndikator} \alias{nnrrBeregnIndikator} \title{Beregn indikatorer} \usage{ nnrrBeregnIndikator(RegData, ind_id) } \arguments{ \item{RegData}{En dataramme med registerdata} } \description{ Inneholder logikk...
/man/nnrrBeregnIndikator.Rd
no_license
Rapporteket/nnrr
R
false
true
367
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nnrrBeregnIndikator.R \name{nnrrBeregnIndikator} \alias{nnrrBeregnIndikator} \title{Beregn indikatorer} \usage{ nnrrBeregnIndikator(RegData, ind_id) } \arguments{ \item{RegData}{En dataramme med registerdata} } \description{ Inneholder logikk...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(1.24397859047877e-309, 4.53307206321927e-318, 6.87207483223275e-308, 2.04053508916683e-317, 5.28723695927775e-310, 1.75763553122127e-294, 1.72555350292395e-307, 4.88567785453453e+111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 4:5)) result <- do.call(C...
/CNull/inst/testfiles/communities_individual_based_sampling_beta_interleaved_matrices/AFL_communities_individual_based_sampling_beta_interleaved_matrices/communities_individual_based_sampling_beta_interleaved_matrices_valgrind_files/1615840547-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
412
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(1.24397859047877e-309, 4.53307206321927e-318, 6.87207483223275e-308, 2.04053508916683e-317, 5.28723695927775e-310, 1.75763553122127e-294, 1.72555350292395e-307, 4.88567785453453e+111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 4:5)) result <- do.call(C...
library(queueing) ### Name: Lq.o_MMInf ### Title: Returns the mean number of customers in the queue in the ### M/M/Infinite queueing model ### Aliases: Lq.o_MMInf ### Keywords: M/M/Infinite ### ** Examples ## create input parameters i_mminf <- NewInput.MMInf(lambda=0.25, mu=4, n=0) ## Build the model o_mminf <- ...
/data/genthat_extracted_code/queueing/examples/Lq.o_MMInf.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
377
r
library(queueing) ### Name: Lq.o_MMInf ### Title: Returns the mean number of customers in the queue in the ### M/M/Infinite queueing model ### Aliases: Lq.o_MMInf ### Keywords: M/M/Infinite ### ** Examples ## create input parameters i_mminf <- NewInput.MMInf(lambda=0.25, mu=4, n=0) ## Build the model o_mminf <- ...
#Open Library and Load FIles shinyUI(fluidPage( # Application theme theme = shinytheme("united"), # Application title titlePanel("BCC Discharge and SWE"), # Sidebar with user input controls sidebarLayout( sidebarPanel( selectInput(inputId='site', label='Ch...
/ui.R
no_license
kriegerkai2/Final_Project
R
false
false
2,275
r
#Open Library and Load FIles shinyUI(fluidPage( # Application theme theme = shinytheme("united"), # Application title titlePanel("BCC Discharge and SWE"), # Sidebar with user input controls sidebarLayout( sidebarPanel( selectInput(inputId='site', label='Ch...
# File tests/gw_sp_tests.R in package ergm, part of the Statnet suite # of packages for network analysis, http://statnet.org . # # This software is distributed under the GPL-3 license. It is free, # open source, and has the attribution requirements (GPL Section 7) at # http://statnet.org/attribution # # Copyrigh...
/data/genthat_extracted_code/ergm/tests/gw_sp_tests.R
no_license
surayaaramli/typeRrh
R
false
false
11,525
r
# File tests/gw_sp_tests.R in package ergm, part of the Statnet suite # of packages for network analysis, http://statnet.org . # # This software is distributed under the GPL-3 license. It is free, # open source, and has the attribution requirements (GPL Section 7) at # http://statnet.org/attribution # # Copyrigh...
\encoding{UTF-8} \name{luminsivity} \alias{luminsivity.1nm} \alias{luminsivity} \docType{data} \title{Luminous Efficiency Functions (photopic and scotopic)} \description{ \tabular{ll}{ \code{luminsivity.1nm} \tab Four luminous efficiency functions, from 360 to 830 nm, at 1nm step } } \format{ A \bold...
/man/luminsivity.Rd
no_license
cran/colorSpec
R
false
false
3,398
rd
\encoding{UTF-8} \name{luminsivity} \alias{luminsivity.1nm} \alias{luminsivity} \docType{data} \title{Luminous Efficiency Functions (photopic and scotopic)} \description{ \tabular{ll}{ \code{luminsivity.1nm} \tab Four luminous efficiency functions, from 360 to 830 nm, at 1nm step } } \format{ A \bold...
#' @title get_dicom_files #' #' @description Get dicom files in `path` recursively, only in `folders`, if specified. #' #' #' @param path path to files #' @param recurse recursive or not #' @param folders folder names #' @return lsit of files #' #' #' @examples #' #' \dontrun{ #' #' items = get_dicom_files("siim_small/...
/R/medical.R
permissive
han-tun/fastai
R
false
false
5,403
r
#' @title get_dicom_files #' #' @description Get dicom files in `path` recursively, only in `folders`, if specified. #' #' #' @param path path to files #' @param recurse recursive or not #' @param folders folder names #' @return lsit of files #' #' #' @examples #' #' \dontrun{ #' #' items = get_dicom_files("siim_small/...
# Copyright (C) 2011 by 52 North Initiative for Geospatial Open Source Software GmbH, Contact: info@52north.org # This program is free software; you can redistribute and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed WI...
/demo/weathersos.R
no_license
eliseadeva/sos4R
R
false
false
8,277
r
# Copyright (C) 2011 by 52 North Initiative for Geospatial Open Source Software GmbH, Contact: info@52north.org # This program is free software; you can redistribute and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed WI...
library(h2o) ### Name: h2o.gsub ### Title: String Global Substitute ### Aliases: h2o.gsub ### ** Examples ## No test: library(h2o) h2o.init() string_to_gsub <- as.h2o("r tutorial") sub_string <- h2o.gsub("r ", "H2O ", string_to_gsub) ## End(No test)
/data/genthat_extracted_code/h2o/examples/h2o.gsub.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
258
r
library(h2o) ### Name: h2o.gsub ### Title: String Global Substitute ### Aliases: h2o.gsub ### ** Examples ## No test: library(h2o) h2o.init() string_to_gsub <- as.h2o("r tutorial") sub_string <- h2o.gsub("r ", "H2O ", string_to_gsub) ## End(No test)
#' \code{ResultSet} for testing and illustration purpouses #' #' \code{ResultSet} created using \code{\link{crossomics}} method, selecting #' \code{"mcia"} method. Result from the integration of proteome and #' exposome data (\code{"mds"}). #' #' @usage data("crs") #' @return A \code{ResultSet} object. #' @examples ...
/R/crs.R
permissive
isglobal-brge/omicRexposome
R
false
false
375
r
#' \code{ResultSet} for testing and illustration purpouses #' #' \code{ResultSet} created using \code{\link{crossomics}} method, selecting #' \code{"mcia"} method. Result from the integration of proteome and #' exposome data (\code{"mds"}). #' #' @usage data("crs") #' @return A \code{ResultSet} object. #' @examples ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/transformations.R \name{make_tabled} \alias{make_tabled} \title{Function to create tmWordCountsTable object from tmParsed} \usage{ make_tabled(x) } \arguments{ \item{x}{tmParsed source} } \value{ returns tmWordCountsTable object ...
/man/make_tabled.Rd
no_license
cran/textmining
R
false
true
555
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/transformations.R \name{make_tabled} \alias{make_tabled} \title{Function to create tmWordCountsTable object from tmParsed} \usage{ make_tabled(x) } \arguments{ \item{x}{tmParsed source} } \value{ returns tmWordCountsTable object ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/intgrd-class.R \name{show,intgrd-method} \alias{show,intgrd-method} \title{Extension of the show function for intgrd objects} \usage{ \S4method{show}{intgrd}(object) } \arguments{ \item{object}{and object of class intgrd} } \description{ Exte...
/fuzzedpackages/intkrige/man/show-intgrd-method.Rd
no_license
akhikolla/testpackages
R
false
true
369
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/intgrd-class.R \name{show,intgrd-method} \alias{show,intgrd-method} \title{Extension of the show function for intgrd objects} \usage{ \S4method{show}{intgrd}(object) } \arguments{ \item{object}{and object of class intgrd} } \description{ Exte...
########################################################################################## # Generate plots # # - data set: AML-sim # - plot type: performance metrics # - method: diffcyt-DA-edgeR # # - supplementary results: 'less distinct' data sets # # Lukas Weber, May 2018 ########################################...
/AML_sim/3_generate_plots/supp_less_distinct/plots_AML_sim_diffcyt_DA_edgeR_supp_less_distinct.R
permissive
lmweber/diffcyt-evaluations
R
false
false
6,773
r
########################################################################################## # Generate plots # # - data set: AML-sim # - plot type: performance metrics # - method: diffcyt-DA-edgeR # # - supplementary results: 'less distinct' data sets # # Lukas Weber, May 2018 ########################################...
# @file Plots.R # # Copyright 2018 Observational Health Data Sciences and Informatics # # This file is part of SelfControlledCaseSeries # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
/R/Plots.R
permissive
sverchkov/SelfControlledCaseSeries
R
false
false
38,856
r
# @file Plots.R # # Copyright 2018 Observational Health Data Sciences and Informatics # # This file is part of SelfControlledCaseSeries # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
#'Continuous-time multi-dimensional optimization for SPM with partially observed covariates (multidimensional GenSPM) #'@references Arbeev, K.G. et al (2009). Genetic model for longitudinal studies of aging, health, and longevity # and its potential application to incomplete data. Journal of Theoretical # Biology 258(1...
/fuzzedpackages/stpm/R/spm_pobs.R
no_license
akhikolla/testpackages
R
false
false
20,347
r
#'Continuous-time multi-dimensional optimization for SPM with partially observed covariates (multidimensional GenSPM) #'@references Arbeev, K.G. et al (2009). Genetic model for longitudinal studies of aging, health, and longevity # and its potential application to incomplete data. Journal of Theoretical # Biology 258(1...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
/r/R/expression.R
permissive
raduteo/arrow
R
false
false
8,906
r
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x ...
/cachematrix.R
no_license
ConstantinHartmann/ProgrammingAssignment2
R
false
false
871
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x ...
#R script to plot histogram of "Global Active Power" from 2007-02-01 to 2007-02-02 #from dataset "Individual household electric power consumption Data Set" #Instruction: #Manually set the working directory first to the folder containing raw data #before running(sourcing) this R-script. #Use library lubridate on work...
/plot3.R
no_license
yansevilla/ExData_Plotting1
R
false
false
1,664
r
#R script to plot histogram of "Global Active Power" from 2007-02-01 to 2007-02-02 #from dataset "Individual household electric power consumption Data Set" #Instruction: #Manually set the working directory first to the folder containing raw data #before running(sourcing) this R-script. #Use library lubridate on work...
library(car) dta <- read.csv(choose.files()) bp <- Boxplot( lm , dta , las = 3 , xlab = "" , ylab = " ") dta$variable[as.numeric(bp)] <- NA write.xlsx(dta,"dataclean.xls") ############################################################# remo <- function(x, na.rm = TRUE, ...) { qnt <- quantile(x, probs=c(.25, .75)...
/RScripts/OutliersDetection.R
no_license
Altanastor/ScientificResearchTools
R
false
false
447
r
library(car) dta <- read.csv(choose.files()) bp <- Boxplot( lm , dta , las = 3 , xlab = "" , ylab = " ") dta$variable[as.numeric(bp)] <- NA write.xlsx(dta,"dataclean.xls") ############################################################# remo <- function(x, na.rm = TRUE, ...) { qnt <- quantile(x, probs=c(.25, .75)...
# Example 9.7 on Page 503 data = read.table("https://raw.githubusercontent.com/AppliedStat/class/master/IntMultiStat/data/T8-4.DAT") X = data.matrix(data) n = nrow(X) p=ncol(X) m=2 OUT = factanal(X, factors=m, rotation="none") OUT loadings(OUT) # or OUT$loadings L = OUT$loadings[,1:m] # specific variances...
/IntMultiStat/R/chap-09/Example-09-07.r
no_license
AppliedStat/class
R
false
false
684
r
# Example 9.7 on Page 503 data = read.table("https://raw.githubusercontent.com/AppliedStat/class/master/IntMultiStat/data/T8-4.DAT") X = data.matrix(data) n = nrow(X) p=ncol(X) m=2 OUT = factanal(X, factors=m, rotation="none") OUT loadings(OUT) # or OUT$loadings L = OUT$loadings[,1:m] # specific variances...
#Data Preprocessing ; importing the dataset = read.csv('Salary_Data.csv') #dataset = dataset[, 2:3] #Splitting the dataset in to training set and test set #install.packages('caTools') library(caTools) set.seed(123) split = sample.split(dataset$Salary, SplitRatio = 2/3 ) training_set = subset(dataset, split == TRUE) t...
/02_Supervised_Learning-Regression/R/Code/03_simple_linear_regression.R
no_license
pavankumarag/Machine_Learning_Implementation
R
false
false
1,692
r
#Data Preprocessing ; importing the dataset = read.csv('Salary_Data.csv') #dataset = dataset[, 2:3] #Splitting the dataset in to training set and test set #install.packages('caTools') library(caTools) set.seed(123) split = sample.split(dataset$Salary, SplitRatio = 2/3 ) training_set = subset(dataset, split == TRUE) t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GenerateDocumentation.R \name{GenerateDocumentation} \alias{GenerateDocumentation} \title{GenerateDocumentation} \usage{ GenerateDocumentation( fun, fun_name = as.character(substitute(fun)), rstudio_pane = getOption("docstring_rstudio_h...
/man/GenerateDocumentation.Rd
no_license
karsfri/HMSr
R
false
true
3,370
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GenerateDocumentation.R \name{GenerateDocumentation} \alias{GenerateDocumentation} \title{GenerateDocumentation} \usage{ GenerateDocumentation( fun, fun_name = as.character(substitute(fun)), rstudio_pane = getOption("docstring_rstudio_h...
library(rtimes) library(dplyr) library(data.table) library(readr) ## Creating yearly datasets for (i in 1991:2016) { print("start") setwd(paste0("C:/Users/Jay/Desktop/Prof.Mike/ArticleDB/",i)) files = list.files(pattern="*.csv") tbl = lapply(files, read.csv) %>% bind_rows() write.csv(tbl,file=paste...
/Nytimes_DB_Script.R
no_license
bandjay/NYtimes
R
false
false
1,418
r
library(rtimes) library(dplyr) library(data.table) library(readr) ## Creating yearly datasets for (i in 1991:2016) { print("start") setwd(paste0("C:/Users/Jay/Desktop/Prof.Mike/ArticleDB/",i)) files = list.files(pattern="*.csv") tbl = lapply(files, read.csv) %>% bind_rows() write.csv(tbl,file=paste...
# Header ------------------------------------------------------------------ # # Title: R code for downloading the European Commission AMECO Database # # Author: Graeme Walsh <graeme.walsh@hotmail.co.uk> # Date: 18/08/2018 # Package Info ------------------------------------------------------------ #' A package for do...
/R/ECAMECO.R
no_license
xprimexinverse/ECAMECO
R
false
false
7,415
r
# Header ------------------------------------------------------------------ # # Title: R code for downloading the European Commission AMECO Database # # Author: Graeme Walsh <graeme.walsh@hotmail.co.uk> # Date: 18/08/2018 # Package Info ------------------------------------------------------------ #' A package for do...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tags-zdb.R \name{zdb_number} \alias{zdb_number} \title{ZDB-Nummer} \usage{ zdb_number(item) } \arguments{ \item{item}{Pica item retrieved from ZDB} } \description{ ZDB-Nummer }
/man/zdb_number.Rd
no_license
herreio/picar
R
false
true
255
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tags-zdb.R \name{zdb_number} \alias{zdb_number} \title{ZDB-Nummer} \usage{ zdb_number(item) } \arguments{ \item{item}{Pica item retrieved from ZDB} } \description{ ZDB-Nummer }
\name{mclustVariance} \alias{mclustVariance} \title{ Template for variance specification for parameterized Gaussian mixture models } \description{ Specification of variance parameters for the various types of Gaussian mixture models. } \usage{ mclustVariance(modelName, d = NULL, G = 2) } \arguments{ \item{mod...
/Current-stuff/R/mclust/man/mclustVariance.Rd
no_license
tonyc2700/phd
R
false
false
4,340
rd
\name{mclustVariance} \alias{mclustVariance} \title{ Template for variance specification for parameterized Gaussian mixture models } \description{ Specification of variance parameters for the various types of Gaussian mixture models. } \usage{ mclustVariance(modelName, d = NULL, G = 2) } \arguments{ \item{mod...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mcmc_functions.R \name{mh} \alias{mh} \title{Fit a generic model using Metropolis-Hastings (MH)} \usage{ mh( N, theta.init, qPROP, qFUN, logPOSTERIOR, nu = 0.001, varnames = NULL, param = list(), chains = 1, parallel = FAL...
/man/mh.Rd
no_license
cran/hmclearn
R
false
true
3,615
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mcmc_functions.R \name{mh} \alias{mh} \title{Fit a generic model using Metropolis-Hastings (MH)} \usage{ mh( N, theta.init, qPROP, qFUN, logPOSTERIOR, nu = 0.001, varnames = NULL, param = list(), chains = 1, parallel = FAL...
#' Estimate the optimal size of training data for classification problem #' #' @param data output from function \code{\link{dataProcess}} #' @param n_sample number of different sample size to simulate. Default is 5 #' @param sample_incr number of samples per condition to increase at each step. Default is 20 #' @param...
/R/SampleSizeCalculationClassification.R
no_license
huang704/MSstats
R
false
false
21,802
r
#' Estimate the optimal size of training data for classification problem #' #' @param data output from function \code{\link{dataProcess}} #' @param n_sample number of different sample size to simulate. Default is 5 #' @param sample_incr number of samples per condition to increase at each step. Default is 20 #' @param...
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
/mepstrends/hc_use/json/code/r/pctEXP__education__race__.r
permissive
HHS-AHRQ/MEPS-summary-tables
R
false
false
3,136
r
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create_fizz.R \name{create_fizz} \alias{create_fizz} \title{Fizzy Drink / Jittered Scatter Plot for any metric} \usage{ create_fizz( data, metric, hrvar = "Organization", mingroup = 5, return = "plot" ) } \arguments{ \item{data}{A S...
/man/create_fizz.Rd
permissive
standardgalactic/wpa
R
false
true
4,853
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create_fizz.R \name{create_fizz} \alias{create_fizz} \title{Fizzy Drink / Jittered Scatter Plot for any metric} \usage{ create_fizz( data, metric, hrvar = "Organization", mingroup = 5, return = "plot" ) } \arguments{ \item{data}{A S...
library(complexplus) Vhat <- function(Data,Order) { # Function to obtain V_ij matrix (P*P) from the estimate of covariance matrix (M^2P*M^2P) of # VAR model coefficients # Reference: Michael Eichler (2005) and Lutkepohl H (1993) # Usage: [Vmat] = Vhat(Data, Order) # Sudhakar Kathari, Srikanth Sarma, Novemb...
/Granger_Causality.R
no_license
Allisterh/Granger_Causality_test
R
false
false
5,735
r
library(complexplus) Vhat <- function(Data,Order) { # Function to obtain V_ij matrix (P*P) from the estimate of covariance matrix (M^2P*M^2P) of # VAR model coefficients # Reference: Michael Eichler (2005) and Lutkepohl H (1993) # Usage: [Vmat] = Vhat(Data, Order) # Sudhakar Kathari, Srikanth Sarma, Novemb...
## cachematrix.R ## Creates a matrix whose inverse can be cached ## Provides functions to set, retrieve, and calculate ## values for the input matrix and its inverse ## Generate a matrix whose inverse value can be cached makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { # Sets the...
/cachematrix.R
no_license
endergrey/ProgrammingAssignment2
R
false
false
1,014
r
## cachematrix.R ## Creates a matrix whose inverse can be cached ## Provides functions to set, retrieve, and calculate ## values for the input matrix and its inverse ## Generate a matrix whose inverse value can be cached makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { # Sets the...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/geometryfns.R \name{auto_BAUs} \alias{auto_BAUs} \title{Automatic BAU generation} \usage{ auto_BAUs(manifold, type = NULL, cellsize = NULL, isea3h_res = NULL, data = NULL, nonconvex_hull = TRUE, convex = -0.05, tunit = NULL, xlims = NULL,...
/FRK/man/auto_BAUs.Rd
no_license
akhikolla/TestedPackages-NoIssues
R
false
true
4,346
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/geometryfns.R \name{auto_BAUs} \alias{auto_BAUs} \title{Automatic BAU generation} \usage{ auto_BAUs(manifold, type = NULL, cellsize = NULL, isea3h_res = NULL, data = NULL, nonconvex_hull = TRUE, convex = -0.05, tunit = NULL, xlims = NULL,...
best <- function(state, outcome) { ## Read outcome data mydata <- read.csv("outcome-of-care-measures.csv", colClasses = "character") states <- read.csv("states.csv", head = FALSE) ## Check that state and outcome are valid if(any(states[,1] == state) == FALSE){ stop("inv...
/ProgrammingAssignment3/best.R
no_license
andyclam/Coursera_R_Programming
R
false
false
1,085
r
best <- function(state, outcome) { ## Read outcome data mydata <- read.csv("outcome-of-care-measures.csv", colClasses = "character") states <- read.csv("states.csv", head = FALSE) ## Check that state and outcome are valid if(any(states[,1] == state) == FALSE){ stop("inv...
library(plotly) ### Name: raster2uri ### Title: Convert a raster object to a data URI ### Aliases: raster2uri ### ** Examples # a red gradient (from ?as.raster) r <- as.raster(matrix(hcl(0, 80, seq(50, 80, 10)), nrow = 4, ncol = 5)) plot(r) # embed the raster as an image plot_ly(x = 1, y = 1) %>% layout( i...
/data/genthat_extracted_code/plotly/examples/raster2uri.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
518
r
library(plotly) ### Name: raster2uri ### Title: Convert a raster object to a data URI ### Aliases: raster2uri ### ** Examples # a red gradient (from ?as.raster) r <- as.raster(matrix(hcl(0, 80, seq(50, 80, 10)), nrow = 4, ncol = 5)) plot(r) # embed the raster as an image plot_ly(x = 1, y = 1) %>% layout( i...
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../../h2o-runit.R') randomParams <- function(distribution, train, test, x, y) { parms <- list() # used to sample a T or F bools <- c(TRUE, FALSE) parms$training_frame <- train Log.info(paste("Using training_frame:", deparse(substi...
/h2o-r/tests/testdir_algos/gbm/runit_GBM_forloop_attack_medium.R
permissive
StephaneFeniar/h2o-dev
R
false
false
3,673
r
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../../h2o-runit.R') randomParams <- function(distribution, train, test, x, y) { parms <- list() # used to sample a T or F bools <- c(TRUE, FALSE) parms$training_frame <- train Log.info(paste("Using training_frame:", deparse(substi...
library(zoo) library(xtx) library(TTR) library(timeSeries) library(slam) library(quantmod) library(quantreg) library(allelematch) path_input<-"C:/Users/YashV/Desktop/Framework Data/" path_output<-"C:/Users/YashV/Desktop/Framework Data/" stck_lvl<-data.frame(read.csv(paste(path_input,"Roll adjusted returns.c...
/Primary Fac BEST_ANALYST_RATING.R
no_license
VivekVerma25/codingground
R
false
false
45,580
r
library(zoo) library(xtx) library(TTR) library(timeSeries) library(slam) library(quantmod) library(quantreg) library(allelematch) path_input<-"C:/Users/YashV/Desktop/Framework Data/" path_output<-"C:/Users/YashV/Desktop/Framework Data/" stck_lvl<-data.frame(read.csv(paste(path_input,"Roll adjusted returns.c...
testlist <- list(hi = 0, lo = 4.55824964853134e-320, mu = 0, sig = 0) result <- do.call(gjam:::tnormRcpp,testlist) str(result)
/gjam/inst/testfiles/tnormRcpp/libFuzzer_tnormRcpp/tnormRcpp_valgrind_files/1610044291-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
126
r
testlist <- list(hi = 0, lo = 4.55824964853134e-320, mu = 0, sig = 0) result <- do.call(gjam:::tnormRcpp,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rc_rounddf.R \name{rounddf} \alias{rounddf} \title{Round all numeric fields in a data frame} \usage{ rounddf(df, roundDigits) } \arguments{ \item{df}{A data frame to round} \item{roundDigits}{Number of digits to round to} } \value{ A rounded...
/dataCompareR/man/rounddf.Rd
permissive
katsoo2/dataCompareR
R
false
true
392
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rc_rounddf.R \name{rounddf} \alias{rounddf} \title{Round all numeric fields in a data frame} \usage{ rounddf(df, roundDigits) } \arguments{ \item{df}{A data frame to round} \item{roundDigits}{Number of digits to round to} } \value{ A rounded...
# Summary method for PLSpredict #' @export summary.PLSprediction <- function(object, na.print=".", digits=3, ...) { stopifnot(inherits(object, "PLSprediction")) # calculate RMSE and MAD item_metrics <- apply(object$item_residuals,2, prediction_metrics) composite_metrics <- apply(object$composite_residuals, 2, ...
/R/summary.R
no_license
sem-in-r/pls-predict
R
false
false
3,978
r
# Summary method for PLSpredict #' @export summary.PLSprediction <- function(object, na.print=".", digits=3, ...) { stopifnot(inherits(object, "PLSprediction")) # calculate RMSE and MAD item_metrics <- apply(object$item_residuals,2, prediction_metrics) composite_metrics <- apply(object$composite_residuals, 2, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/binomial.R \name{bin_cumulative} \alias{bin_cumulative} \title{Bin Cumulative} \usage{ bin_cumulative(trials, prob) } \arguments{ \item{trials}{number of trials (numeric)} \item{prob}{probability of success (numeric)} } \value{ data frame of...
/binomial/man/bin_cumulative.Rd
no_license
stat133-sp19/hw-stat133-rohandivate
R
false
true
560
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/binomial.R \name{bin_cumulative} \alias{bin_cumulative} \title{Bin Cumulative} \usage{ bin_cumulative(trials, prob) } \arguments{ \item{trials}{number of trials (numeric)} \item{prob}{probability of success (numeric)} } \value{ data frame of...
#Read Data data1 = read.table('household_power_consumption.txt', sep = ';', header = TRUE, stringsAsFactors = FALSE) #Subset Data: data1$Date = as.Date(data1$Date, "%d/%m/%Y") Data2 = data1[data1$Date >= as.Date("2007-02-01") & data1$Date <= as.Date("2007-02-02"),] #Create Plot 2 Data2$datetime <- strptime(paste(as...
/plot2.R
no_license
soumil1088/ExData_Plotting1
R
false
false
549
r
#Read Data data1 = read.table('household_power_consumption.txt', sep = ';', header = TRUE, stringsAsFactors = FALSE) #Subset Data: data1$Date = as.Date(data1$Date, "%d/%m/%Y") Data2 = data1[data1$Date >= as.Date("2007-02-01") & data1$Date <= as.Date("2007-02-02"),] #Create Plot 2 Data2$datetime <- strptime(paste(as...
data.lastDense<-read.csv("d:/newresultlabel.csv",header = F) data.label<-read.csv("d:/inputdata.csv", header= F) data.lastDense<-cbind(data.lastDense,data.label) #data.lastDense<-read.csv("d:/dense128.csv",header = T) #data.lastDense<-read.csv("d:/max.csv",header = T) #data.lastDense<-fread("d:/predict_activations.csv"...
/analysis_box.R
no_license
AnneJoJo/HandWritingDigitDetection-Seg
R
false
false
7,127
r
data.lastDense<-read.csv("d:/newresultlabel.csv",header = F) data.label<-read.csv("d:/inputdata.csv", header= F) data.lastDense<-cbind(data.lastDense,data.label) #data.lastDense<-read.csv("d:/dense128.csv",header = T) #data.lastDense<-read.csv("d:/max.csv",header = T) #data.lastDense<-fread("d:/predict_activations.csv"...
library(tidycensus) library(tidyverse) library(sf) # # API key ------------------------------------------------------------------------ # # installed census api key readRenviron("~/.Renviron") Sys.getenv("CENSUS_API_KEY") # # Get data ------------------------------------------------------------------------ # # Se...
/src/built/antiquated/07_getacs_plumb.R
permissive
uva-bi-sdad/capitals
R
false
false
1,392
r
library(tidycensus) library(tidyverse) library(sf) # # API key ------------------------------------------------------------------------ # # installed census api key readRenviron("~/.Renviron") Sys.getenv("CENSUS_API_KEY") # # Get data ------------------------------------------------------------------------ # # Se...
library(shinyjqui) library(DT) library(shinythemes) library(dplyr) library(d3heatmap) library(ggplot2) library(plotly) library(fields) library(RColorBrewer) library(sortable) #################### # define functions # #################### # convert logical vector to character toFactor <- function(x){ return(as.facto...
/training_apps/registry_training.R
no_license
danieljfeller/panelViz
R
false
false
4,050
r
library(shinyjqui) library(DT) library(shinythemes) library(dplyr) library(d3heatmap) library(ggplot2) library(plotly) library(fields) library(RColorBrewer) library(sortable) #################### # define functions # #################### # convert logical vector to character toFactor <- function(x){ return(as.facto...
#' PCA of samples (if use of DESeq2) #' #' Principal Component Analysis of samples based on the 500 most variant features on VST- or rlog-counts (if use of DESeq2) #' #' @param counts.trans a matrix a transformed counts (VST- or rlog-counts) #' @param group factor vector of the condition from which each sample belongs ...
/deseq2_multi/3.0/PCAPlot.R
no_license
cyverse/docker-builds
R
false
false
2,331
r
#' PCA of samples (if use of DESeq2) #' #' Principal Component Analysis of samples based on the 500 most variant features on VST- or rlog-counts (if use of DESeq2) #' #' @param counts.trans a matrix a transformed counts (VST- or rlog-counts) #' @param group factor vector of the condition from which each sample belongs ...
# ===================================================================== # Inline components # ===================================================================== #' @export Inlines <- function(...) { Element("Inlines", ...) } #' @export Inliness <- function(...) { Element("Inliness", ...) } # This can't actua...
/R/types_inline.R
permissive
rstudio/remarker
R
false
false
3,678
r
# ===================================================================== # Inline components # ===================================================================== #' @export Inlines <- function(...) { Element("Inlines", ...) } #' @export Inliness <- function(...) { Element("Inliness", ...) } # This can't actua...
#' Tibble con i dati di no2 per 26 stazioni della regione PIEMONTE #' #' @format Un tibble con 8 colonne e 19006 osservazioni #' #' @usage #' no2 "no2"
/R/no2.R
permissive
progettopulvirus/piemonte
R
false
false
152
r
#' Tibble con i dati di no2 per 26 stazioni della regione PIEMONTE #' #' @format Un tibble con 8 colonne e 19006 osservazioni #' #' @usage #' no2 "no2"
EPS <- 0.02 # allowed error a <- c(1, 0) b <- c(0, 1) c <- c(0.75, 0.75) performances <- rbind(a, b, c) constraints <- matrix(b - a, nrow=1) # a > b -> b - a <= 0 pair <- c(1, 3) source('compute.metrics.R') stopifnot(abs(results$dvf - 0.5) < EPS) stopifnot(results$win == 1) stopifnot(results$apn == 2) stopifnot(abs...
/prefsel/src/main/resources/unit.test.R
no_license
tommite/pubs-code
R
false
false
427
r
EPS <- 0.02 # allowed error a <- c(1, 0) b <- c(0, 1) c <- c(0.75, 0.75) performances <- rbind(a, b, c) constraints <- matrix(b - a, nrow=1) # a > b -> b - a <= 0 pair <- c(1, 3) source('compute.metrics.R') stopifnot(abs(results$dvf - 0.5) < EPS) stopifnot(results$win == 1) stopifnot(results$apn == 2) stopifnot(abs...
data<-read.table("household_power_consumption.txt",sep=";",header=TRUE) newdata<-data[which(data$Date=="1/2/2007"|data$Date=="2/2/2007"),] write.csv(newdata,"newdata2.csv") newdata2<-read.csv("newdata2.csv") png(file="plot4.png",width = 480, height = 480) par(mfrow=c(2,2)) #plot1 plot(newdata2$Global_active_power,ty...
/plot4.R
no_license
FuensantaAG/ExData_Plotting1
R
false
false
1,061
r
data<-read.table("household_power_consumption.txt",sep=";",header=TRUE) newdata<-data[which(data$Date=="1/2/2007"|data$Date=="2/2/2007"),] write.csv(newdata,"newdata2.csv") newdata2<-read.csv("newdata2.csv") png(file="plot4.png",width = 480, height = 480) par(mfrow=c(2,2)) #plot1 plot(newdata2$Global_active_power,ty...
\name{Diffogram} \alias{Diffogram} \title{Plot Pairwise Differences} \description{ Plot pairwise differences by a common. } \usage{ Diffogram(Formula, Data, Term, conf.level=0.95, adj="lsd", Title, ...) } \arguments{ \item{Formula}{a conventional formula for a linear model} \item{Data}{a \code{data.f...
/man/Diffogram.Rd
no_license
asancpt/sasLM
R
false
false
965
rd
\name{Diffogram} \alias{Diffogram} \title{Plot Pairwise Differences} \description{ Plot pairwise differences by a common. } \usage{ Diffogram(Formula, Data, Term, conf.level=0.95, adj="lsd", Title, ...) } \arguments{ \item{Formula}{a conventional formula for a linear model} \item{Data}{a \code{data.f...
rakeonvar.numeric <- function(weighton, weightto, weightvec) { weighton <- sapply(weighton, function(x) { if (is.na(x)) { x <- length(weightto) + 1 } else { x <- x } }) lwo <- length(table(weighton)) lwt <- length(weightto) pctchk <- 0 ...
/anesrake/R/rakeonvar.numeric.R
no_license
ingted/R-Examples
R
false
false
1,254
r
rakeonvar.numeric <- function(weighton, weightto, weightvec) { weighton <- sapply(weighton, function(x) { if (is.na(x)) { x <- length(weightto) + 1 } else { x <- x } }) lwo <- length(table(weighton)) lwt <- length(weightto) pctchk <- 0 ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/boot_stat.R \name{boot_stat} \alias{boot_stat} \title{Compute the bootstrap test statistic for parallel implementation} \usage{ boot_stat(u, Y_tilde, X, D, epsilon, N3, p, prec, N, sample_mat, generalized, weights, y_grid, phi_n, M_bar, DX)...
/man/boot_stat.Rd
no_license
cgaillac/RationalExp
R
false
true
1,946
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/boot_stat.R \name{boot_stat} \alias{boot_stat} \title{Compute the bootstrap test statistic for parallel implementation} \usage{ boot_stat(u, Y_tilde, X, D, epsilon, N3, p, prec, N, sample_mat, generalized, weights, y_grid, phi_n, M_bar, DX)...
# Function to get the number of missing gene symbols and ENTREZIDs at each step of processing get.miss.Stats <- function(x,i,cnames,rnames) { miss.Temp <- list() miss.Temp <- data.frame(miss.Symb=num.NA(x$Symbol), miss.entrez=num.NA(x$ENTREZID), ...
/func_get_miss_Stats.R
no_license
dannemil/comt_expression
R
false
false
433
r
# Function to get the number of missing gene symbols and ENTREZIDs at each step of processing get.miss.Stats <- function(x,i,cnames,rnames) { miss.Temp <- list() miss.Temp <- data.frame(miss.Symb=num.NA(x$Symbol), miss.entrez=num.NA(x$ENTREZID), ...
# libraries library(sp) library(rgdal) setwd('/scratch/brown/will1809') source("Xero.MACA.Survival.Map.functions.R") # loads m$models$Gm.1st load("Xeromodel.RData") # set up climate data files tmax90s <- "macav2metdata_tasmax_bcc-csm1-1_r1i1p1_historical_1995_1999_CONUS_daily.nc" tmin90s <- "macav2metdata_tasmin_...
/DeriveMACA.EMC.Dec7.Future.R
no_license
readingradio/WilliamsGinzel.TCD.Xerotolerance.2021
R
false
false
8,535
r
# libraries library(sp) library(rgdal) setwd('/scratch/brown/will1809') source("Xero.MACA.Survival.Map.functions.R") # loads m$models$Gm.1st load("Xeromodel.RData") # set up climate data files tmax90s <- "macav2metdata_tasmax_bcc-csm1-1_r1i1p1_historical_1995_1999_CONUS_daily.nc" tmin90s <- "macav2metdata_tasmin_...
#' #' Calculate f-statistics quickly #' #' Using matrix algebbra, quickly calculate #' f statistics for comparing nested models #' #' @param dat An input data set #' @param mod The model matrix for the alternative model to be fit #' @param mod0 The model matrix for the null model to be fit. If NULL, the null model #...
/R/fstats.R
no_license
prpatil/tspreg
R
false
false
987
r
#' #' Calculate f-statistics quickly #' #' Using matrix algebbra, quickly calculate #' f statistics for comparing nested models #' #' @param dat An input data set #' @param mod The model matrix for the alternative model to be fit #' @param mod0 The model matrix for the null model to be fit. If NULL, the null model #...
/lib/crowding_distance_sort.R
no_license
uinme/R-NSPSO
R
false
false
1,556
r
library(bib2df) library(dplyr) library(tidytext) library(stringr) library(wordcloud) library(knitr) pal <- brewer.pal(8,"Dark2") path<-"~/Downloads/References from .bib" df <- bib2df(path) df %>% dplyr::filter(!is.na(ABSTRACT)) %>% unnest_tokens(word,ABSTRACT) %>% anti_join(stop_words) %>% count(word, sort = TRUE) %>%...
/src/wordcloud.R
permissive
stain/metadata-in-rcr
R
false
false
440
r
library(bib2df) library(dplyr) library(tidytext) library(stringr) library(wordcloud) library(knitr) pal <- brewer.pal(8,"Dark2") path<-"~/Downloads/References from .bib" df <- bib2df(path) df %>% dplyr::filter(!is.na(ABSTRACT)) %>% unnest_tokens(word,ABSTRACT) %>% anti_join(stop_words) %>% count(word, sort = TRUE) %>%...
library(shiny) library(shinyFiles) options(shiny.maxRequestSize=10000*1024^2) shinyUI(fluidPage( # Application title headerPanel("Trendy"), # Sidebar with sliders that demonstrate various available options fluidRow(width = 12, height = 100, # file column(4, file...
/ui.R
no_license
rhondabacher/TrendyServer
R
false
false
3,160
r
library(shiny) library(shinyFiles) options(shiny.maxRequestSize=10000*1024^2) shinyUI(fluidPage( # Application title headerPanel("Trendy"), # Sidebar with sliders that demonstrate various available options fluidRow(width = 12, height = 100, # file column(4, file...
library(shiny) library(leaflet) library(shinythemes) fluidPage( title = "Volcanos!", theme = shinytheme("slate"), tags$head( tags$style(HTML(" @import url('//fonts.googleapis.com/css?family=Quicksand|Cabin:400,700'); h2 { font-family: 'Quicksand...
/shiny-volcano/ui.R
no_license
elhohn/shiny-gcp
R
false
false
2,175
r
library(shiny) library(leaflet) library(shinythemes) fluidPage( title = "Volcanos!", theme = shinytheme("slate"), tags$head( tags$style(HTML(" @import url('//fonts.googleapis.com/css?family=Quicksand|Cabin:400,700'); h2 { font-family: 'Quicksand...
#' Computes Quantiles #' #' \code{QuantileGpois} computes the quantile for the generalized Poisson distribution #' for specified values of percentile, rate, and dispersion parameters. #' #' @param p percentile of the generalized Poisson distribution, p should be between 0 and 1. #' @param theta the rate parameter in t...
/R/QuantileGpois.R
no_license
cran/RNGforGPD
R
false
false
3,191
r
#' Computes Quantiles #' #' \code{QuantileGpois} computes the quantile for the generalized Poisson distribution #' for specified values of percentile, rate, and dispersion parameters. #' #' @param p percentile of the generalized Poisson distribution, p should be between 0 and 1. #' @param theta the rate parameter in t...
#' Helpers for targeting multiple cells in different locations #' #' These helper functions are used to target individual cells in different #' locations (e.g., the stub, the column labels, the title, etc.). They can be #' used in any of these functions (which all have a `locations` argument): #' [tab_footnote()], [tab...
/R/helpers.R
permissive
jordanmllr5/gt
R
false
false
34,722
r
#' Helpers for targeting multiple cells in different locations #' #' These helper functions are used to target individual cells in different #' locations (e.g., the stub, the column labels, the title, etc.). They can be #' used in any of these functions (which all have a `locations` argument): #' [tab_footnote()], [tab...
version version minor install.packages('devtools') library(devtools) install_github('databrew/databrew', dependencies = TRUE, force = TRUE) pkgs <- c('data.table', 'devtools', 'extrafont', 'ggmap', 'ggthemes', 'gsheet', 'knitr', 'leaflet'...
/rcourse/hw1/submissions/Nelio_Nobela.R
no_license
databrew/malawi
R
false
false
3,446
r
version version minor install.packages('devtools') library(devtools) install_github('databrew/databrew', dependencies = TRUE, force = TRUE) pkgs <- c('data.table', 'devtools', 'extrafont', 'ggmap', 'ggthemes', 'gsheet', 'knitr', 'leaflet'...
function (x, p, vp) { e <- get("data.env", .GlobalEnv) e[["COMP_Q_VECT"]][[length(e[["COMP_Q_VECT"]]) + 1]] <- list(x = x, p = p, vp = vp) .Call("_HistDAWass_COMP_Q_VECT", PACKAGE = "HistDAWass", x, p, vp) }
/valgrind_test_dir/COMP_Q_VECT-test.R
no_license
akhikolla/RcppDeepStateTest
R
false
false
239
r
function (x, p, vp) { e <- get("data.env", .GlobalEnv) e[["COMP_Q_VECT"]][[length(e[["COMP_Q_VECT"]]) + 1]] <- list(x = x, p = p, vp = vp) .Call("_HistDAWass_COMP_Q_VECT", PACKAGE = "HistDAWass", x, p, vp) }
### Example 5.3: Death Penalty and Race (Categorical Predictors) deathpenalty <- read.table("deathpenalty.txt") deathpenalty dp <- reshape(deathpenalty, v.names="Freq", timevar="DeathPenalty", idvar=c("Defendant","Victim"), direction="wide") dp ### Fit Saturated Model sat.mod <- glm(cbind(Freq.Yes...
/lec/ex5.3.R
no_license
peach07up/stat426
R
false
false
870
r
### Example 5.3: Death Penalty and Race (Categorical Predictors) deathpenalty <- read.table("deathpenalty.txt") deathpenalty dp <- reshape(deathpenalty, v.names="Freq", timevar="DeathPenalty", idvar=c("Defendant","Victim"), direction="wide") dp ### Fit Saturated Model sat.mod <- glm(cbind(Freq.Yes...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/drug_transporter_node_parser.R \name{parse_drug_transporters_actions} \alias{parse_drug_transporters_actions} \title{Extracts the drug transporters actions element and return data as data frame.} \usage{ parse_drug_transporters_actions(save_t...
/man/parse_drug_transporters_actions.Rd
no_license
Sparklingredstar/dbparser
R
false
true
2,524
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/drug_transporter_node_parser.R \name{parse_drug_transporters_actions} \alias{parse_drug_transporters_actions} \title{Extracts the drug transporters actions element and return data as data frame.} \usage{ parse_drug_transporters_actions(save_t...
## Coursera: Exploratory Data Analysis, Project 2 ## Data sourced from the U.S. EPA National Emissions Inventory website ## http://www.epa.gov/ttn/chief/eiinformation.html ## Load the required libraries library(ggplot2) library(dplyr) ## Read in the NEI data (working directory must be set prior to running the script)...
/ExpData2/plot4.R
no_license
mtmitchell13/datasciencecoursera
R
false
false
1,249
r
## Coursera: Exploratory Data Analysis, Project 2 ## Data sourced from the U.S. EPA National Emissions Inventory website ## http://www.epa.gov/ttn/chief/eiinformation.html ## Load the required libraries library(ggplot2) library(dplyr) ## Read in the NEI data (working directory must be set prior to running the script)...
library(tidyverse) #' includes dplyr, tidyr, ggplot2 library(lubridate) #' for manipulating dates and times library(leaflet) #' for geospatial visualization library(ggmap) #' for plotting on a map #' Read data sets listings = read_csv('../data/listings_2019.csv') calendar = read_csv('../data/calendar_2019.csv...
/3_advanced_R/shiny_prep.R
no_license
adelarue/cos_2020
R
false
false
2,703
r
library(tidyverse) #' includes dplyr, tidyr, ggplot2 library(lubridate) #' for manipulating dates and times library(leaflet) #' for geospatial visualization library(ggmap) #' for plotting on a map #' Read data sets listings = read_csv('../data/listings_2019.csv') calendar = read_csv('../data/calendar_2019.csv...
# National Chargepoint Registry API library # Using http://chargepoints.dft.gov.uk/api/help .onAttach <- function(libname, pkgname) { packageStartupMessage(" ____ _____ ______ _______ |_ \\|_ _|.' ___ ||_ __ \\ | \\ | | / .' \\_| | |__) | | |\\ \\| | | | | __ / _| |_\\ |_\\ `.___.'\\...
/R/ncr.R
no_license
Daveyr/chargepointapi
R
false
false
2,526
r
# National Chargepoint Registry API library # Using http://chargepoints.dft.gov.uk/api/help .onAttach <- function(libname, pkgname) { packageStartupMessage(" ____ _____ ______ _______ |_ \\|_ _|.' ___ ||_ __ \\ | \\ | | / .' \\_| | |__) | | |\\ \\| | | | | __ / _| |_\\ |_\\ `.___.'\\...
#!/usr/bin/env Rscript #include gdata library library(gdata) #read dataset dataset <- read.csv("data100.csv") #read the number of rows num.row = nrow(dataset) #set a seed set.seed(125) #make sample values GRE.awa = c(2,2.5,3,3.5,4,4.5,5,5.5) #typeof(dataset$Is_new_GRE) #Type will be "integer" dataset$Is_new_GRE <- as...
/Code/Dataset/fill_Dataset.R
no_license
arundasan91/Cloud-Project
R
false
false
1,938
r
#!/usr/bin/env Rscript #include gdata library library(gdata) #read dataset dataset <- read.csv("data100.csv") #read the number of rows num.row = nrow(dataset) #set a seed set.seed(125) #make sample values GRE.awa = c(2,2.5,3,3.5,4,4.5,5,5.5) #typeof(dataset$Is_new_GRE) #Type will be "integer" dataset$Is_new_GRE <- as...
##################################################### # 07June2012 EGRET.R # RMH 17Jan2012 various functions modified and added for flux bias analysis # RMH 21Jan2012 Added plotConcHist # RMH 23Jan2012 Added plotContours # RMH 23Jan2012 Enhancements of graphics, and added scientific notation to axes # RMH 24J...
/R/EGRET.R
permissive
zdionne-MDDEFP/EGRET
R
false
false
8,646
r
##################################################### # 07June2012 EGRET.R # RMH 17Jan2012 various functions modified and added for flux bias analysis # RMH 21Jan2012 Added plotConcHist # RMH 23Jan2012 Added plotContours # RMH 23Jan2012 Enhancements of graphics, and added scientific notation to axes # RMH 24J...
#+++++++++++++++++++++++++ # Gibbs #+++++++++++++++++++++++++ gibbsPPssl = function(Y, d, H = 2, Nit = 1e3, burnin = 500, prior = list(s0 = 1), verbose = print_gibbs(), ...) { #++++++++++++++++++++++++++++++++ # Extract quantities from data #++++++++++++++++++++++++++++++++ N = N...
/mills/R/GIBBS_PPssl.R
no_license
david-dunson/mills
R
false
false
6,297
r
#+++++++++++++++++++++++++ # Gibbs #+++++++++++++++++++++++++ gibbsPPssl = function(Y, d, H = 2, Nit = 1e3, burnin = 500, prior = list(s0 = 1), verbose = print_gibbs(), ...) { #++++++++++++++++++++++++++++++++ # Extract quantities from data #++++++++++++++++++++++++++++++++ N = N...
#' Analytic calculation of periodically stationary moments implied by a \code{hhh4}-model #' #' Returns the mean vector and covariance matrix of the periodically stationary distribution #' implied by an hhh4 object. #' #' @param hhh4Obj \code{hhh4} object for which to calculate stationary moments #' @param start start ...
/R/stationary_moments.R
no_license
jbracher/hhh4addon
R
false
false
13,777
r
#' Analytic calculation of periodically stationary moments implied by a \code{hhh4}-model #' #' Returns the mean vector and covariance matrix of the periodically stationary distribution #' implied by an hhh4 object. #' #' @param hhh4Obj \code{hhh4} object for which to calculate stationary moments #' @param start start ...
## general.R --- File for generally useful functions. ## Author: Stephen J Eglen (2 functions from Ben Bolker's bbmisc package, GPL'ed) ## Copyright: GPL .file.or.gz <- function(file) { ## Return FILE if it exists, or FILE.gz if that exists. ## Otherwise, return NA and generate a warning. if (file.exists(file)) ...
/IGM.MEA/R/general.R
no_license
ingted/R-Examples
R
false
false
4,577
r
## general.R --- File for generally useful functions. ## Author: Stephen J Eglen (2 functions from Ben Bolker's bbmisc package, GPL'ed) ## Copyright: GPL .file.or.gz <- function(file) { ## Return FILE if it exists, or FILE.gz if that exists. ## Otherwise, return NA and generate a warning. if (file.exists(file)) ...
## Survival Curves # Not a totally useful thing in our line of work as it's used more in the biology industry. # Kind of cool, and I did it once so it's a shame to get rid of it! # These packages need to be installed before load install.packages("GGally", dependencies = TRUE, repos = "http://cran.rstudi...
/Charts - Survival Curves.R
permissive
TheNerdyCat/Survival-Charts
R
false
false
1,265
r
## Survival Curves # Not a totally useful thing in our line of work as it's used more in the biology industry. # Kind of cool, and I did it once so it's a shame to get rid of it! # These packages need to be installed before load install.packages("GGally", dependencies = TRUE, repos = "http://cran.rstudi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gets.R \name{get_random_item} \alias{get_random} \alias{get_random_item} \alias{get_random_property} \title{Retrieve randomly-selected Wikidata items or properties} \usage{ get_random_item(limit = 1, ...) get_random_property(limit = 1, ...) ...
/man/get_random.Rd
permissive
yutannihilation/WikidataR
R
false
true
1,153
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gets.R \name{get_random_item} \alias{get_random} \alias{get_random_item} \alias{get_random_property} \title{Retrieve randomly-selected Wikidata items or properties} \usage{ get_random_item(limit = 1, ...) get_random_property(limit = 1, ...) ...
test.is.aromatic <- function() { m <- parse.smiles('c1ccccc1CC')[[1]] x <- unlist(lapply(get.atoms(m), is.aromatic)) checkEquals(6, length(which(x))) do.typing(m) do.aromaticity(m) x <- unlist(lapply(get.atoms(m), is.aromatic)) checkEquals(6, length(which(x))) } test.get.hcount <- function() { m <- p...
/rcdk/inst/unitTests/runit.atoms.R
no_license
schymane/cdkr
R
false
false
818
r
test.is.aromatic <- function() { m <- parse.smiles('c1ccccc1CC')[[1]] x <- unlist(lapply(get.atoms(m), is.aromatic)) checkEquals(6, length(which(x))) do.typing(m) do.aromaticity(m) x <- unlist(lapply(get.atoms(m), is.aromatic)) checkEquals(6, length(which(x))) } test.get.hcount <- function() { m <- p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data-movie.R \docType{data} \name{movie_552} \alias{movie_552} \title{The Princess Bride} \format{igraph object} \source{ https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3 https://www.imdb.com/title/tt0093779 } ...
/man/movie_552.Rd
permissive
kjhealy/networkdata
R
false
true
1,017
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data-movie.R \docType{data} \name{movie_552} \alias{movie_552} \title{The Princess Bride} \format{igraph object} \source{ https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3 https://www.imdb.com/title/tt0093779 } ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/id_mutations.R \name{call_mutations} \alias{call_mutations} \title{Identify Sample Amino Acid Changes} \usage{ call_mutations( sample.dir, min.alt.freq = 0.01, name.sep = "NULL", reference = "Wuhan", write.mut.table = FALSE, fasta...
/MixviR_v1.2/man/call_mutations.Rd
no_license
Niroshan23/MixviR
R
false
true
2,018
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/id_mutations.R \name{call_mutations} \alias{call_mutations} \title{Identify Sample Amino Acid Changes} \usage{ call_mutations( sample.dir, min.alt.freq = 0.01, name.sep = "NULL", reference = "Wuhan", write.mut.table = FALSE, fasta...
\name{follow.user} \alias{follow.user} \title{Start following a given user} \usage{ follow.user(user, ctx = get.github.context()) } \arguments{ \item{user}{the given user} \item{ctx}{the github context object} } \value{ none } \description{ Start following a given user }
/man/follow.user.Rd
permissive
prateek05/rgithub
R
false
false
284
rd
\name{follow.user} \alias{follow.user} \title{Start following a given user} \usage{ follow.user(user, ctx = get.github.context()) } \arguments{ \item{user}{the given user} \item{ctx}{the github context object} } \value{ none } \description{ Start following a given user }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/print_filter_objects.R \name{print.totalCountFilt} \alias{print.totalCountFilt} \title{print.totalCountFilt} \usage{ \method{print}{totalCountFilt}(x, ...) } \arguments{ \item{x}{An object of type 'totalCountFilt'} \item{...}{further argumen...
/man/print-totalCountFilt.Rd
permissive
pmartR/pmartR
R
false
true
425
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/print_filter_objects.R \name{print.totalCountFilt} \alias{print.totalCountFilt} \title{print.totalCountFilt} \usage{ \method{print}{totalCountFilt}(x, ...) } \arguments{ \item{x}{An object of type 'totalCountFilt'} \item{...}{further argumen...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tcor.R \name{tcor} \alias{tcor} \title{Thresholded Correlation} \usage{ tcor(x, y = NULL, t = 0.99, p = 10, include_anti = FALSE, filter = c("distributed", "local"), dry_run = FALSE, rank = FALSE, max_iter = 4, restart, ...) } \arguments{...
/man/tcor.Rd
no_license
bwlewis/tcor
R
false
true
5,666
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tcor.R \name{tcor} \alias{tcor} \title{Thresholded Correlation} \usage{ tcor(x, y = NULL, t = 0.99, p = 10, include_anti = FALSE, filter = c("distributed", "local"), dry_run = FALSE, rank = FALSE, max_iter = 4, restart, ...) } \arguments{...
#' Test normality and homogeneity of variance of Input data #' #' @param data a data.frame contain the input data #' @param i col index wtich need to test #' @param method_cv which method to test variance, included "leveneTest","bartlett.test". #' @examples #' # data(data_wt) #' NorNorCVTest(data = data_wt, i= 4) #' ...
/R/NorNorCVTest.R
no_license
JohnMeatbun/EasyStat
R
false
false
2,654
r
#' Test normality and homogeneity of variance of Input data #' #' @param data a data.frame contain the input data #' @param i col index wtich need to test #' @param method_cv which method to test variance, included "leveneTest","bartlett.test". #' @examples #' # data(data_wt) #' NorNorCVTest(data = data_wt, i= 4) #' ...