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 |
|---|---|---|---|---|---|---|---|---|---|
library(zoo)
sites <- c("BARC", "CRAM", "LIRO", "PRLA", "PRPO", "SUGG")
met_data <- NULL
for(i in 1:length(sites)){
nc <- ncdf4::nc_open(paste0("/data/drivers/noaa/NOAAGEFS_1hr_stacked_average/",sites[i],"/observed-met-noaa_",sites[i],".nc"))
obs_met_time <- ncdf4::ncvar_get(nc, "time")
origin <- stringr::str_sub(ncd... | /workflows/neon_lakes_ms/calculate_temp_sd.R | permissive | FLARE-forecast/NEON-forecast-code | R | false | false | 1,228 | r | library(zoo)
sites <- c("BARC", "CRAM", "LIRO", "PRLA", "PRPO", "SUGG")
met_data <- NULL
for(i in 1:length(sites)){
nc <- ncdf4::nc_open(paste0("/data/drivers/noaa/NOAAGEFS_1hr_stacked_average/",sites[i],"/observed-met-noaa_",sites[i],".nc"))
obs_met_time <- ncdf4::ncvar_get(nc, "time")
origin <- stringr::str_sub(ncd... |
#Assignment 1 plot 1
#Load file and filter data first
alldata <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?")
mydata = alldata[which(as.Date(alldata[,'Date'], "%d/%m/%Y") == "2007-02-01" | as.Date(alldata[,'Date'], "%d/%m/%Y") == "2007-02-02"), ]
#Now lets do some plottin... | /plot1.R | no_license | yogaII4git/ExData_Plotting1 | R | false | false | 477 | r | #Assignment 1 plot 1
#Load file and filter data first
alldata <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?")
mydata = alldata[which(as.Date(alldata[,'Date'], "%d/%m/%Y") == "2007-02-01" | as.Date(alldata[,'Date'], "%d/%m/%Y") == "2007-02-02"), ]
#Now lets do some plottin... |
library(tidyverse)
library(ggthemes)
superhero_dat <- read_csv(here::here("data/week9_comic_characters.csv"))
hero_labeler <- c("DC" = "DC, New Earth continuity",
"Marvel" = "Marvel, Earth-616 continuity")
# Plot 1
superhero_dat %>%
group_by(publisher, year) %>%
summarise(new_heros = n()) %>... | /tidy_2018/tidy_09/tidy_09.R | no_license | dylanjm/tidy_tuesday | R | false | false | 7,316 | r | library(tidyverse)
library(ggthemes)
superhero_dat <- read_csv(here::here("data/week9_comic_characters.csv"))
hero_labeler <- c("DC" = "DC, New Earth continuity",
"Marvel" = "Marvel, Earth-616 continuity")
# Plot 1
superhero_dat %>%
group_by(publisher, year) %>%
summarise(new_heros = n()) %>... |
#Vector Manipulation#
# Create two vectors. Here V1 and V2 are of same length
v1 <- c(3,8,4,5,0,11)
v2 <- c(4,11,0,8,1,2)
# Vector addition.
add.result <- v1+v2
print(add.result)
# Vector substraction.
sub.result <- v1-v2
print(sub.result)
# Vector multiplication.
multi.result <- v1*v2
print(multi.resul... | /Day5.R | no_license | BioinformaticsDeepLearning/Learn_R_and_Use_R | R | false | false | 2,669 | r | #Vector Manipulation#
# Create two vectors. Here V1 and V2 are of same length
v1 <- c(3,8,4,5,0,11)
v2 <- c(4,11,0,8,1,2)
# Vector addition.
add.result <- v1+v2
print(add.result)
# Vector substraction.
sub.result <- v1-v2
print(sub.result)
# Vector multiplication.
multi.result <- v1*v2
print(multi.resul... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 85156
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 85156
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc02-nonuniform-... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Miller-Marin/trafficlight-controller/tlc02-nonuniform-depth-140/tlc02-nonuniform-depth-140.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 697 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 85156
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 85156
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc02-nonuniform-... |
# Merge test and training datasets into one set
# setwd("d:/coursera/gcd_project/UCI HAR Dataset")
xtest <- read.table("UCI HAR Dataset/test/X_test.txt", header=FALSE)
ytest <- read.table("UCI HAR Dataset/test/y_test.txt", header=FALSE)
stest <- read.table("UCI HAR Dataset/test/subject_test.txt", header=FALSE)
xtrain... | /run_analysis.R | no_license | hemihua/gcd_project | R | false | false | 2,055 | r | # Merge test and training datasets into one set
# setwd("d:/coursera/gcd_project/UCI HAR Dataset")
xtest <- read.table("UCI HAR Dataset/test/X_test.txt", header=FALSE)
ytest <- read.table("UCI HAR Dataset/test/y_test.txt", header=FALSE)
stest <- read.table("UCI HAR Dataset/test/subject_test.txt", header=FALSE)
xtrain... |
library(dplyr)
starwars %>%
filter(height == min(height, na.rm = TRUE)) %>%
select(name, height)
starwars %>%
mutate(BMI = mass / height^2) %>%
filter(BMI == max(BMI, na.rm = TRUE))
starwars %>%
select_("name")
| /carrots_workshop/modelowanie/pomocnicze_skrypty/dplyr_zadanie.R | no_license | mi2-warsaw/RLadies | R | false | false | 242 | r | library(dplyr)
starwars %>%
filter(height == min(height, na.rm = TRUE)) %>%
select(name, height)
starwars %>%
mutate(BMI = mass / height^2) %>%
filter(BMI == max(BMI, na.rm = TRUE))
starwars %>%
select_("name")
|
print("hello")
#install.packages("httr")
#install.packages("jsonlite")
library(httr)
library(jsonlite)
#install.packages()
endpoint <- "http://api.openweathermap.org/data/2.5/weather?q=Lublin&units=metric&appid=ccd2c7f8b414cadf0c4383ce0a541dc2"
getWeather <- httr::GET(endpoint)
weatherText<-content(getWeather,"text")... | /r1.R | no_license | testtlz/stud_r1 | R | false | false | 809 | r | print("hello")
#install.packages("httr")
#install.packages("jsonlite")
library(httr)
library(jsonlite)
#install.packages()
endpoint <- "http://api.openweathermap.org/data/2.5/weather?q=Lublin&units=metric&appid=ccd2c7f8b414cadf0c4383ce0a541dc2"
getWeather <- httr::GET(endpoint)
weatherText<-content(getWeather,"text")... |
.slidesEnv <- new.env(parent = emptyenv())
.slidesEnv$Token <- NULL
# Set token to environment
set_token <- function(value) {
.slidesEnv$Token <- value
return(value)
}
# Get token from environment
get_token <- function() {
.slidesEnv$Token
}
#' Authorize R package to access Github API
#' @description This is ... | /R/auth.R | no_license | hairizuanbinnoorazman/githubR | R | false | false | 850 | r | .slidesEnv <- new.env(parent = emptyenv())
.slidesEnv$Token <- NULL
# Set token to environment
set_token <- function(value) {
.slidesEnv$Token <- value
return(value)
}
# Get token from environment
get_token <- function() {
.slidesEnv$Token
}
#' Authorize R package to access Github API
#' @description This is ... |
#' Create small multiples based on edge attributes
#'
#' This function is equivalent to [ggplot2::facet_wrap()] but only
#' facets edges. Nodes are repeated in every panel.
#'
#' @inheritParams ggplot2::facet_wrap
#'
#' @family ggraph-facets
#'
#' @examples
#' gr <- tidygraph::as_tbl_graph(highschool)
#'
#' ggraph(gr) ... | /ggraph/R/facet_edges.R | permissive | akhikolla/InformationHouse | R | false | false | 2,235 | r | #' Create small multiples based on edge attributes
#'
#' This function is equivalent to [ggplot2::facet_wrap()] but only
#' facets edges. Nodes are repeated in every panel.
#'
#' @inheritParams ggplot2::facet_wrap
#'
#' @family ggraph-facets
#'
#' @examples
#' gr <- tidygraph::as_tbl_graph(highschool)
#'
#' ggraph(gr) ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LRMoE-class.R
\docType{class}
\name{LRMoE-class}
\alias{LRMoE-class}
\alias{LRMoE}
\title{A Reference Class which contains parameters of a LRMoE model.}
\description{
LRMoE contains all the parameters of a Logistic Regularized
Mixture-of-Expe... | /man/LRMoE-class.Rd | no_license | fchamroukhi/HDME | R | false | true | 2,119 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LRMoE-class.R
\docType{class}
\name{LRMoE-class}
\alias{LRMoE-class}
\alias{LRMoE}
\title{A Reference Class which contains parameters of a LRMoE model.}
\description{
LRMoE contains all the parameters of a Logistic Regularized
Mixture-of-Expe... |
# data reading and make it tidy
# Missing value coding
na_code <- c("", "NA", 66, 99, 999, "・")
# 衆議院データ ----
# 2009
dat_syu_2009 <- seijika_syu_link$`2009_syu` %>% read_csv(locale=locale(encoding="CP932"), #候補者名にJISが入ってる。
na = c("", "NA", 99, "・") # 99 = NA
... | /R/read_data.R | no_license | takuizum/UTSA | R | false | false | 6,877 | r | # data reading and make it tidy
# Missing value coding
na_code <- c("", "NA", 66, 99, 999, "・")
# 衆議院データ ----
# 2009
dat_syu_2009 <- seijika_syu_link$`2009_syu` %>% read_csv(locale=locale(encoding="CP932"), #候補者名にJISが入ってる。
na = c("", "NA", 99, "・") # 99 = NA
... |
library(Hmisc)
setwd ("C:/Users/tatav/OneDrive/Desktop/R_Language/phuse-scripts-master/phuse-scripts-master/data/sdtm/cdiscpilot01")
ae<- sasxport.get("ae.xpt")
usethis:: use_data (ae , compress = "xz" )
dm<- sasxport.get("dm.xpt")
usethis:: use_data (dm , compress = "xz" )
cm<- sasxport.get("cm.xpt")
usethis::... | /data-raw/ae.R | no_license | ptata22/testpackage | R | false | false | 355 | r | library(Hmisc)
setwd ("C:/Users/tatav/OneDrive/Desktop/R_Language/phuse-scripts-master/phuse-scripts-master/data/sdtm/cdiscpilot01")
ae<- sasxport.get("ae.xpt")
usethis:: use_data (ae , compress = "xz" )
dm<- sasxport.get("dm.xpt")
usethis:: use_data (dm , compress = "xz" )
cm<- sasxport.get("cm.xpt")
usethis::... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bvar_conjugate.R
\name{bvar_conj_lambda2dummy}
\alias{bvar_conj_lambda2dummy}
\title{Create dummy observations from lambdas}
\usage{
bvar_conj_lambda2dummy(Y_in, Z_in = NULL, constant = TRUE, p = 4,
lambda = c(0.2, 1, 1, 1, 100, 100), delta... | /man/bvar_conj_lambda2dummy.Rd | no_license | lnsongxf/bvarr | R | false | true | 2,387 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bvar_conjugate.R
\name{bvar_conj_lambda2dummy}
\alias{bvar_conj_lambda2dummy}
\title{Create dummy observations from lambdas}
\usage{
bvar_conj_lambda2dummy(Y_in, Z_in = NULL, constant = TRUE, p = 4,
lambda = c(0.2, 1, 1, 1, 100, 100), delta... |
\name{mcmcdb_paridx-methods}
\alias{mcmcdb_paridx}
\alias{mcmcdb_paridx,Mcmcdb-method}
\alias{mcmcdb_paridx,McmcdbParameters-method}
\alias{mcmcdb_paridx-methods}
\title{Get parameter indices}
\arguments{
\item{object}{Object}
}
\value{
\code{list} of integer matrices. Each element of the list
is a parameter arra... | /man/mcmcdb_paridx-methods.Rd | no_license | jrnold/mcmcdb | R | false | false | 2,058 | rd | \name{mcmcdb_paridx-methods}
\alias{mcmcdb_paridx}
\alias{mcmcdb_paridx,Mcmcdb-method}
\alias{mcmcdb_paridx,McmcdbParameters-method}
\alias{mcmcdb_paridx-methods}
\title{Get parameter indices}
\arguments{
\item{object}{Object}
}
\value{
\code{list} of integer matrices. Each element of the list
is a parameter arra... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tdc_functions.R
\name{tdc_in_study}
\alias{tdc_in_study}
\title{participants over time}
\usage{
tdc_in_study(x, tstart = "tstart", tstop = "tstop")
}
\arguments{
\item{x}{data frame with time periods starting at tstart, ending at tstop.}
\it... | /man/tdc_in_study.Rd | no_license | renlund/dm | R | false | true | 908 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tdc_functions.R
\name{tdc_in_study}
\alias{tdc_in_study}
\title{participants over time}
\usage{
tdc_in_study(x, tstart = "tstart", tstop = "tstop")
}
\arguments{
\item{x}{data frame with time periods starting at tstart, ending at tstop.}
\it... |
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <- function(inverse) inv <<- inverse
getinverse <- function() inv
list(set = set, get = get,
setinverse = setinverse,
getinverse = getinverse)
}
cacheSo... | /cachematrix.R | no_license | sarjodas/ProgrammingAssignment | R | false | false | 520 | r | makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <- function(inverse) inv <<- inverse
getinverse <- function() inv
list(set = set, get = get,
setinverse = setinverse,
getinverse = getinverse)
}
cacheSo... |
# TESTS MET REGRESSION STANDARDIZED ALS NIET ALLE PREDICTOREN
# IN DE HYPOTHESE VOORKOMEN
data(sesamesim)
# ===================================================================
# HIERONDER EEN VOORBEELD VAN DE BUG - TEST TWEE VAN DRIE
# ===================================================================
regr <- lm... | /tests/testthat/test-bain_lm_standardized_bug.R | no_license | cran/bain | R | false | false | 6,349 | r | # TESTS MET REGRESSION STANDARDIZED ALS NIET ALLE PREDICTOREN
# IN DE HYPOTHESE VOORKOMEN
data(sesamesim)
# ===================================================================
# HIERONDER EEN VOORBEELD VAN DE BUG - TEST TWEE VAN DRIE
# ===================================================================
regr <- lm... |
# Author: Giovanni Nattino
# Simulation analysis comparing NN matching and
# 3-way conditional matching in 3 groups.
# Reference: Triplet Matching for Estimating Causal Effects with Three Treatment Arms:
# A Comparative Study of Mortality by Trauma Center Level
####################################################... | /codes/simulation analysis/run simulations.R | permissive | jasa-acs/Triplet-Matching-for-Estimating-Causal-Effects-With-Three-Treatment-Arms-A-Comparative-Study-of-M... | R | false | false | 28,474 | r | # Author: Giovanni Nattino
# Simulation analysis comparing NN matching and
# 3-way conditional matching in 3 groups.
# Reference: Triplet Matching for Estimating Causal Effects with Three Treatment Arms:
# A Comparative Study of Mortality by Trauma Center Level
####################################################... |
############################################
# Load the gapminder package
library(gapminder)
# Load the dplyr package
library(dplyr)
# Look at the gapminder dataset
gapminder
# Filters
gapminder %>%
filter(year == 2007, country == 'United States')
############################################
library(gapminder)
l... | /Introduction_to_the_Tidyverse/01 - Data wrangling.R | no_license | gustavolds/data_science_study | R | false | false | 1,631 | r | ############################################
# Load the gapminder package
library(gapminder)
# Load the dplyr package
library(dplyr)
# Look at the gapminder dataset
gapminder
# Filters
gapminder %>%
filter(year == 2007, country == 'United States')
############################################
library(gapminder)
l... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cmtk_io.R
\name{trim}
\alias{trim}
\title{nat package internal functions}
\usage{
trim(t)
}
\arguments{
\item{t}{Character vector to trim}
}
\description{
Utility function to trim whitespace at start and end of lines
}
| /man/nat-internal.Rd | no_license | cyang-2014/nat | R | false | true | 298 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cmtk_io.R
\name{trim}
\alias{trim}
\title{nat package internal functions}
\usage{
trim(t)
}
\arguments{
\item{t}{Character vector to trim}
}
\description{
Utility function to trim whitespace at start and end of lines
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gl.report.maf.r
\name{gl.report.maf}
\alias{gl.report.maf}
\title{Report minor allele frequency for loci}
\usage{
gl.report.maf(gl, minind = 5, plot = TRUE)
}
\arguments{
\item{gl}{-- name of the genlight object containing the SNP data [requi... | /man/gl.report.maf.Rd | no_license | Maschette/dartR | R | false | true | 1,212 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gl.report.maf.r
\name{gl.report.maf}
\alias{gl.report.maf}
\title{Report minor allele frequency for loci}
\usage{
gl.report.maf(gl, minind = 5, plot = TRUE)
}
\arguments{
\item{gl}{-- name of the genlight object containing the SNP data [requi... |
## Caching the Inverse of a Matrix
## using 2 functions: makeCacheMatrix and cacheSolve
## Creates a special matrix object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
inverse_matrix <- NULL
set <- function(y) {
x <<- y
inverse_matrix <- NULL
}
get <- function() { x }
set... | /cachematrix.R | no_license | Stephane5/ProgrammingAssignment2 | R | false | false | 955 | r | ## Caching the Inverse of a Matrix
## using 2 functions: makeCacheMatrix and cacheSolve
## Creates a special matrix object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
inverse_matrix <- NULL
set <- function(y) {
x <<- y
inverse_matrix <- NULL
}
get <- function() { x }
set... |
#' @title Generate a dataframe containing information that can be used to analyze the relative distribution of ages and coordinates in a paper.
#' @param df The input dataframe (the NLP file)
#' @param dms_regex The input regex for coordinates written in dms format
#' @param dd_regex The input regex for coordinates wri... | /R/sentence.distribution.R | permissive | EarthCubeGeochron/IRDDive | R | false | false | 2,119 | r | #' @title Generate a dataframe containing information that can be used to analyze the relative distribution of ages and coordinates in a paper.
#' @param df The input dataframe (the NLP file)
#' @param dms_regex The input regex for coordinates written in dms format
#' @param dd_regex The input regex for coordinates wri... |
#######################################
# COVID-19 CDC USA Cumulative Incidence
# Scrape date from CDC
# "Total number of COVID-19 cases in the United States by date reported"
# https://www.cdc.gov/coronavirus/2019-ncov/cases-updates/cases-in-us.html
#######################################
rm(list=ls())
source(paste0(... | /covid19-infections-NatureComms/1-data-old/0-scrape-usa-cdc-cum-inc.R | no_license | meahmadi/covid-death-per-incidence | R | false | false | 847 | r | #######################################
# COVID-19 CDC USA Cumulative Incidence
# Scrape date from CDC
# "Total number of COVID-19 cases in the United States by date reported"
# https://www.cdc.gov/coronavirus/2019-ncov/cases-updates/cases-in-us.html
#######################################
rm(list=ls())
source(paste0(... |
# Set initial values and parameters #######
area = 1000 #1 square kiolmeter = 1000m^2
nstart.sn = c(S1 = 5*area, S2 = 5*area, S3 = 5*area,
E1 = 5*area, E2 = 5*area, E3 = 5*area,
I1 = 5*area, I2 = 5*area, I3 = 5*area,
Wt = 50, Wu = 50)
t.sn = seq(0,365*300,10)
eff = 0.85 #M... | /Data/snail_epi_parameters.R | no_license | cmhoove14/Prawn_fisheries_Public_health | R | false | false | 4,044 | r |
# Set initial values and parameters #######
area = 1000 #1 square kiolmeter = 1000m^2
nstart.sn = c(S1 = 5*area, S2 = 5*area, S3 = 5*area,
E1 = 5*area, E2 = 5*area, E3 = 5*area,
I1 = 5*area, I2 = 5*area, I3 = 5*area,
Wt = 50, Wu = 50)
t.sn = seq(0,365*300,10)
eff = 0.85 #M... |
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,... | /R/Methods.gel.R | no_license | cran/gmm | R | false | false | 11,095 | r | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{build_doc_structure}
\alias{build_doc_structure}
\title{build R markdown document structure, using knitr functions}
\usage{
build_doc_structure(text)
}
\arguments{
\item{text}{text representing an R Markdown document}
}
\descrip... | /man/build_doc_structure.Rd | no_license | selcukfidan47/testwhat | R | false | true | 388 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{build_doc_structure}
\alias{build_doc_structure}
\title{build R markdown document structure, using knitr functions}
\usage{
build_doc_structure(text)
}
\arguments{
\item{text}{text representing an R Markdown document}
}
\descrip... |
# David - represents the task
# Pepper - represents the actions
# David: Ok Pepper here is some data
data<-read.csv("C:/Users/dwoo57/Google Drive/Career/Data Mining Competitions/Kaggle/Walmart - Inventory and weather prediction/Experiments/Beta/Data_Collection/Store_31_item_9_2012_2014.csv")
# David: Ok Pepper, what ... | /Data_Science_ModUnits/PepperIO_Curiosity_Feature_Exploration_V4_Putting_it_all_together.R | no_license | dzhwoo/R-Scripts | R | false | false | 9,308 | r | # David - represents the task
# Pepper - represents the actions
# David: Ok Pepper here is some data
data<-read.csv("C:/Users/dwoo57/Google Drive/Career/Data Mining Competitions/Kaggle/Walmart - Inventory and weather prediction/Experiments/Beta/Data_Collection/Store_31_item_9_2012_2014.csv")
# David: Ok Pepper, what ... |
#second graph
data <- read.table("./household_power_consumption.txt", sep = ";", header = TRUE, na.strings = "?", stringsAsFactors = FALSE)
library(dplyr)
library(tidyr)
subs <- data[which(data$Date == "2/2/2007" | data$Date == "1/2/2007"),]
z <- mutate(subs, timestamp = paste(Date, Time))
strptime(z$timestamp, format... | /ProjectSubmissions/plot2.R | no_license | mikepmorgan/ExData_Plotting1 | R | false | false | 968 | r | #second graph
data <- read.table("./household_power_consumption.txt", sep = ";", header = TRUE, na.strings = "?", stringsAsFactors = FALSE)
library(dplyr)
library(tidyr)
subs <- data[which(data$Date == "2/2/2007" | data$Date == "1/2/2007"),]
z <- mutate(subs, timestamp = paste(Date, Time))
strptime(z$timestamp, format... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatial_visuals.R
\name{visPlot}
\alias{visPlot}
\title{visPlot}
\usage{
visPlot(gobject, sdimx = NULL, sdimy = NULL, sdimz = NULL,
point_size = 3, point_border_col = "black",
point_border_stroke = 0.1, cell_color = NULL,
cell_color_cod... | /man/visPlot.Rd | permissive | Leonguos/Giotto | R | false | true | 2,050 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatial_visuals.R
\name{visPlot}
\alias{visPlot}
\title{visPlot}
\usage{
visPlot(gobject, sdimx = NULL, sdimy = NULL, sdimz = NULL,
point_size = 3, point_border_col = "black",
point_border_stroke = 0.1, cell_color = NULL,
cell_color_cod... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lint.R
\name{lint_dir_rmd}
\alias{lint_dir_rmd}
\alias{lint_assignment}
\title{Lint all .R and .Rmd recursively in a directory}
\usage{
lint_dir_rmd(...)
lint_assignment(...)
}
\arguments{
\item{...}{
Arguments passed on to \code{\link[lin... | /man/lint_dir_rmd.Rd | no_license | amcdavid/LintMarkdown | R | false | true | 1,347 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lint.R
\name{lint_dir_rmd}
\alias{lint_dir_rmd}
\alias{lint_assignment}
\title{Lint all .R and .Rmd recursively in a directory}
\usage{
lint_dir_rmd(...)
lint_assignment(...)
}
\arguments{
\item{...}{
Arguments passed on to \code{\link[lin... |
setup_logger = function(path_prefix, log_name)
{
options(digits.secs=3)
suppressWarnings(require(logging))
basicConfig(level='FINEST')
addHandler(
writeToFile,
file=paste0(path_prefix, strftime(Sys.Date(), '%Y%m%d'), '.log'),
logger=log_name,
level='DEBUG')... | /logger/r_logger.R | no_license | barretobrock/blue2 | R | false | false | 1,072 | r |
setup_logger = function(path_prefix, log_name)
{
options(digits.secs=3)
suppressWarnings(require(logging))
basicConfig(level='FINEST')
addHandler(
writeToFile,
file=paste0(path_prefix, strftime(Sys.Date(), '%Y%m%d'), '.log'),
logger=log_name,
level='DEBUG')... |
rm(list = ls(all = T))
dir <- "/homelocal/twibawa/coursera/getting_and_cleaning_data/course_project1/UCI HAR Dataset/"
setwd(dir)
#read feaature
ftr <- readLines("features.txt")
#read activity labels
act_label <- readLines("activity_labels.txt")
#directory train data
indir1 <- "/homelocal/twibawa/coursera/getting_an... | /run_analysis.R | no_license | twibawa/getting_and_cleaning_data | R | false | false | 3,184 | r | rm(list = ls(all = T))
dir <- "/homelocal/twibawa/coursera/getting_and_cleaning_data/course_project1/UCI HAR Dataset/"
setwd(dir)
#read feaature
ftr <- readLines("features.txt")
#read activity labels
act_label <- readLines("activity_labels.txt")
#directory train data
indir1 <- "/homelocal/twibawa/coursera/getting_an... |
testlist <- list(x = structure(c(2.31584307392677e+77, 1.03542155949144e+220, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance::fastdist,testlist)
str(result) | /multivariance/inst/testfiles/fastdist/AFL_fastdist/fastdist_valgrind_files/1613098154-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 303 | r | testlist <- list(x = structure(c(2.31584307392677e+77, 1.03542155949144e+220, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance::fastdist,testlist)
str(result) |
##Convert Barometric Pressures to METRIC water column equivalent:
convertBaroPressure<-function(x, type){
if(type == "in") {
x <-(x * 0.3453) - 9
} else {
if(type == "mm"){
x <-(x * 0.01362)
} else {
if(type== "psi") {
x <-(x * 0.7043)
} else {
if(type== "kPa") {
x <-(x * 0.1022)
} else {
... | /unpublished/R_functions/convertBaroPressure.r | no_license | nickrsan/sierra-code-library | R | false | false | 457 | r | ##Convert Barometric Pressures to METRIC water column equivalent:
convertBaroPressure<-function(x, type){
if(type == "in") {
x <-(x * 0.3453) - 9
} else {
if(type == "mm"){
x <-(x * 0.01362)
} else {
if(type== "psi") {
x <-(x * 0.7043)
} else {
if(type== "kPa") {
x <-(x * 0.1022)
} else {
... |
## The following two functions will cache the inverse of a matrix, or solve
## and return the inverse if not already cached.
## makeCacheMatrix will create an object that can cache the inverse of a matrix.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv... | /cachematrix.R | no_license | els2171/ProgrammingAssignment2 | R | false | false | 901 | r | ## The following two functions will cache the inverse of a matrix, or solve
## and return the inverse if not already cached.
## makeCacheMatrix will create an object that can cache the inverse of a matrix.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv... |
# Classification Tree method to predict whether a diabetic patient is likely to be readmitted or nto
# The following code is implemented on balanced dataset
library(caTools)
library(rpart)
library(rpart.plot)
library(dplyr)
library(caret)
library(class)
library(mlr)
library(e1071)
library(tree)
library(ISL... | /Prediction/ClassificationTree_Balanced Data.R | no_license | viraj1596/DataMiningHealthcare_Capstone | R | false | false | 1,710 | r | # Classification Tree method to predict whether a diabetic patient is likely to be readmitted or nto
# The following code is implemented on balanced dataset
library(caTools)
library(rpart)
library(rpart.plot)
library(dplyr)
library(caret)
library(class)
library(mlr)
library(e1071)
library(tree)
library(ISL... |
library(lubridate)
energy = read.delim("./data/feb_household_power_consumption.txt", sep=";")
energy$DateTime <- strptime(paste(energy$Date, energy$Time), "%d/%m/%Y %H:%M:%S")
energy$Date <- as.Date(energy$Date, "%d/%m/%Y")
png(filename = "plot4.png",
width = 480, height = 480, units = "px")
par(mfrow =... | /plot4.R | no_license | jgill/ExData_Plotting1 | R | false | false | 1,041 | r | library(lubridate)
energy = read.delim("./data/feb_household_power_consumption.txt", sep=";")
energy$DateTime <- strptime(paste(energy$Date, energy$Time), "%d/%m/%Y %H:%M:%S")
energy$Date <- as.Date(energy$Date, "%d/%m/%Y")
png(filename = "plot4.png",
width = 480, height = 480, units = "px")
par(mfrow =... |
#' This script projects the distribution of the market invariants for the stock market (i.e. the compounded returns)
#' from the estimation interval (normal assumption) to the investment horizon. Then it computes the distribution of prices
#' at the investment horizon analytically, by full Monte Carlo, and by delta/dur... | /demo/S_EquityProjectionPricing.R | no_license | runiaruni/Meucci | R | false | false | 2,272 | r | #' This script projects the distribution of the market invariants for the stock market (i.e. the compounded returns)
#' from the estimation interval (normal assumption) to the investment horizon. Then it computes the distribution of prices
#' at the investment horizon analytically, by full Monte Carlo, and by delta/dur... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 69465
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 69465
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc01-uniform-dep... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Miller-Marin/trafficlight-controller/tlc01-uniform-depth-73/tlc01-uniform-depth-73.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 689 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 69465
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 69465
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc01-uniform-dep... |
#### Function Skeleton ####
## Create a new book club repo
# prefixing with dot to hide from average book club user
.bc_create <- function(path = NULL,
rstudio = rstudioapi::isAvailable(),
open = rlang::is_interactive()){
# Usage and feel should be a lot like usethis... | /R/functions.R | permissive | r4ds/bookclubber-deprecated | R | false | false | 2,553 | r | #### Function Skeleton ####
## Create a new book club repo
# prefixing with dot to hide from average book club user
.bc_create <- function(path = NULL,
rstudio = rstudioapi::isAvailable(),
open = rlang::is_interactive()){
# Usage and feel should be a lot like usethis... |
\name{Haslach_tcmatAirline}
\alias{Haslach_tcmatAirline}
\docType{data}
\title{
Freiburg-Haslach: airline distances
}
\description{
Airline distances for customer origins (districts) and destinations (grocery stores) in Freiburg-Haslach
}
\usage{data("Haslach_tcmatAirline")}
\format{
A data frame with ... | /man/Haslach_tcmatAirline.Rd | no_license | cran/MCI2 | R | false | false | 3,825 | rd | \name{Haslach_tcmatAirline}
\alias{Haslach_tcmatAirline}
\docType{data}
\title{
Freiburg-Haslach: airline distances
}
\description{
Airline distances for customer origins (districts) and destinations (grocery stores) in Freiburg-Haslach
}
\usage{data("Haslach_tcmatAirline")}
\format{
A data frame with ... |
library(shiny)
TitanicData <- as.data.frame(Titanic)
ClassVector <- unique(TitanicData$Class)
shinyUI(pageWithSidebar(
headerPanel("Survival Prediction on Titanic!"),
sidebarPanel(
selectInput('class','Class',choices = c("NA",'1st','2nd','3rd','Crew')),
selectInput('sex','Sex',choices = c("NA",'Male','Fem... | /ui.R | no_license | DivyanshBhatia/DevelopingDataProducts | R | false | false | 2,459 | r | library(shiny)
TitanicData <- as.data.frame(Titanic)
ClassVector <- unique(TitanicData$Class)
shinyUI(pageWithSidebar(
headerPanel("Survival Prediction on Titanic!"),
sidebarPanel(
selectInput('class','Class',choices = c("NA",'1st','2nd','3rd','Crew')),
selectInput('sex','Sex',choices = c("NA",'Male','Fem... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/alleleotype_genepop.R
\name{alleleotype_genepop}
\alias{alleleotype_genepop}
\title{Alleleotype -> GENEPOP format}
\usage{
alleleotype_genepop(input, numsim = 100, path)
}
\arguments{
\item{input}{path to input file (csv) containing major all... | /man/alleleotype_genepop.Rd | no_license | zhenbinHU/genepopedit | R | false | true | 860 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/alleleotype_genepop.R
\name{alleleotype_genepop}
\alias{alleleotype_genepop}
\title{Alleleotype -> GENEPOP format}
\usage{
alleleotype_genepop(input, numsim = 100, path)
}
\arguments{
\item{input}{path to input file (csv) containing major all... |
na.as.zero <- function(x) {
x[is.na(x) | is.null(x)] <- 0
x
}
na.as.false <- function(x) {
x[is.na(x) | is.null(x)] <- FALSE
x
}
na.as.true <- function(x) {
x[is.na(x) | is.null(x)] <- TRUE
x
} | /lib/na.R | no_license | rodrigorgs/arch-violations-bugs | R | false | false | 207 | r | na.as.zero <- function(x) {
x[is.na(x) | is.null(x)] <- 0
x
}
na.as.false <- function(x) {
x[is.na(x) | is.null(x)] <- FALSE
x
}
na.as.true <- function(x) {
x[is.na(x) | is.null(x)] <- TRUE
x
} |
library(randomForest)
func_conn <- read.csv("../fMRI_modeling/func_conn.csv")
pd_scores <- read.csv("PD_Scores.csv")
aseg_stats <- read.csv("../fMRI_modeling/aseg_stats.csv")
socio_economics <- read.csv("Socio-Economics.csv")
func_conn <- merge(func_conn, aseg_stats, by.x="Scan", by.y="Measure.volume")
# Remove rows w... | /fMRI_modeling/PD_Scores.R | no_license | edwardwang888/ppmi | R | false | false | 1,979 | r | library(randomForest)
func_conn <- read.csv("../fMRI_modeling/func_conn.csv")
pd_scores <- read.csv("PD_Scores.csv")
aseg_stats <- read.csv("../fMRI_modeling/aseg_stats.csv")
socio_economics <- read.csv("Socio-Economics.csv")
func_conn <- merge(func_conn, aseg_stats, by.x="Scan", by.y="Measure.volume")
# Remove rows w... |
#!/usr/bin/env Rscript
# Dom Smith <dosmith@cern.ch>
##__________________________________________________________________||
argv <- commandArgs(trailingOnly = FALSE)
##__________________________________________________________________||
return.variable <- function(tbl)
{
variable <- tbl[1]
return(variable)
} ... | /plot_scripts/draw_plot.R | no_license | dsmiff/R-Scripts | R | false | false | 1,547 | r | #!/usr/bin/env Rscript
# Dom Smith <dosmith@cern.ch>
##__________________________________________________________________||
argv <- commandArgs(trailingOnly = FALSE)
##__________________________________________________________________||
return.variable <- function(tbl)
{
variable <- tbl[1]
return(variable)
} ... |
library(readxl)
used_cars <- read_excel("C:/Users/Clarence Sahibdeen/Desktop/Assignment/used.cars.xlsx")
View(used_cars)
#test
str(used_cars)
head(used_cars)
#print(used_cars)
#Transmission count graph
counts_t <- table(used_cars$transmission)
barplot(counts_t,xlab = "Type of Transmission", main="Transmission cou... | /R.R | no_license | ayrtonsahibdeen1011/used_cars_r | R | false | false | 648 | r |
library(readxl)
used_cars <- read_excel("C:/Users/Clarence Sahibdeen/Desktop/Assignment/used.cars.xlsx")
View(used_cars)
#test
str(used_cars)
head(used_cars)
#print(used_cars)
#Transmission count graph
counts_t <- table(used_cars$transmission)
barplot(counts_t,xlab = "Type of Transmission", main="Transmission cou... |
library(shiny)
library(leaflet)
library(leaflet)
library(ggplot2)
library(maps)
library(mapproj)
library(dplyr)
library(shiny)
files <- list.files(path="./cleaned_well_data", pattern="*.csv", full.names=TRUE, recursive=FALSE)
list_of_data <- list()
for (file in files){
file_name <- substr(file, 44, (nchar(file) -... | /shiny_app.R | no_license | ashwinb6/fall2_hw_team6 | R | false | false | 2,768 | r | library(shiny)
library(leaflet)
library(leaflet)
library(ggplot2)
library(maps)
library(mapproj)
library(dplyr)
library(shiny)
files <- list.files(path="./cleaned_well_data", pattern="*.csv", full.names=TRUE, recursive=FALSE)
list_of_data <- list()
for (file in files){
file_name <- substr(file, 44, (nchar(file) -... |
# todos
datos_correlacion <- read.csv2("datos-encuestaLider.csv", header = FALSE)
test <- matrix(1:18, nrow=3)
aux_test <- matrix(1:18, nrow=3)
rownames(test) <- c("Statistic-z", "pvalor", "Estimates-tau")
colnames(test) <- c("Alineam-Demo","Alineam-Afili","Alineam-Visio","Alineam-Coach","Alineam-Pace","Alineam-Comm")
... | /analisisDatosAline-Lideres.R | no_license | GemaGutierrez/datosArticuloAlineamiento | R | false | false | 1,995 | r | # todos
datos_correlacion <- read.csv2("datos-encuestaLider.csv", header = FALSE)
test <- matrix(1:18, nrow=3)
aux_test <- matrix(1:18, nrow=3)
rownames(test) <- c("Statistic-z", "pvalor", "Estimates-tau")
colnames(test) <- c("Alineam-Demo","Alineam-Afili","Alineam-Visio","Alineam-Coach","Alineam-Pace","Alineam-Comm")
... |
library(tidyverse)
fips_hrr <- read_csv(
"https://raw.githubusercontent.com/cmu-delphi/covidcast-indicators/main/_delphi_utils_python/delphi_utils/data/fips_hrr_table.csv",
col_types = "cid")
hf <- pivot_wider(fips_hrr, names_from = fips, values_from = weight)
hf <- hf %>% arrange(hrr)
hf_mat <- hf %>% select(-hr... | /forecast/code/deprecated/hrr_state_aggr.R | permissive | cmu-delphi/covidcast-pnas | R | false | false | 1,291 | r | library(tidyverse)
fips_hrr <- read_csv(
"https://raw.githubusercontent.com/cmu-delphi/covidcast-indicators/main/_delphi_utils_python/delphi_utils/data/fips_hrr_table.csv",
col_types = "cid")
hf <- pivot_wider(fips_hrr, names_from = fips, values_from = weight)
hf <- hf %>% arrange(hrr)
hf_mat <- hf %>% select(-hr... |
# Copyright (C) 2011 Juuso Parkkinen <juuso.parkkinen(at)gmail.com. All rights reserved.
# This program is open source software; you can redistribute it and/or
# modify it under the terms of the FreeBSD License (keep this notice):
# http://en.wikipedia.org/wiki/BSD_licenses
# This program is distributed in the hope t... | /R/HRI.R | permissive | juusohaapanen/soRvi-dev | R | false | false | 2,461 | r | # Copyright (C) 2011 Juuso Parkkinen <juuso.parkkinen(at)gmail.com. All rights reserved.
# This program is open source software; you can redistribute it and/or
# modify it under the terms of the FreeBSD License (keep this notice):
# http://en.wikipedia.org/wiki/BSD_licenses
# This program is distributed in the hope t... |
# Base code for plotting energyMixStats plots
# Mohammad Ansarin (ansarin@rsm.nl)
# Created December 19, 2015
#
# Prepares datasets and plots exports from EnergyMixStats logtool-example.
#
# For each timeslot, report includes
# purchased energy and cost
# customer energy consumption and value
# customer energy pr... | /r-scripts/energyMixStats.R | no_license | powertac/powertac-tools | R | false | false | 3,233 | r | # Base code for plotting energyMixStats plots
# Mohammad Ansarin (ansarin@rsm.nl)
# Created December 19, 2015
#
# Prepares datasets and plots exports from EnergyMixStats logtool-example.
#
# For each timeslot, report includes
# purchased energy and cost
# customer energy consumption and value
# customer energy pr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fortify_stats_lm.R
\name{autoplot.lm}
\alias{autoplot.lm}
\title{Autoplot \code{stats::lm} and \code{stats::glm}}
\usage{
\method{autoplot}{lm}(object, which = c(1:3, 5), data = NULL,
colour = "#444444", size = NULL, linetype = NULL, alpha ... | /man/autoplot.lm.Rd | no_license | inambioinfo/ggfortify | R | false | true | 2,601 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fortify_stats_lm.R
\name{autoplot.lm}
\alias{autoplot.lm}
\title{Autoplot \code{stats::lm} and \code{stats::glm}}
\usage{
\method{autoplot}{lm}(object, which = c(1:3, 5), data = NULL,
colour = "#444444", size = NULL, linetype = NULL, alpha ... |
# This is the server logic for a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://www.rstudio.com/shiny/
#
library(shiny)
techs <- function(car) mtcars[car,]
shinyServer(
function(input, output,session) {
updateSelectInput(session, "select", choices =... | /server.R | no_license | frajer/Developing-Data-Products-ShinyApp | R | false | false | 873 | r |
# This is the server logic for a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://www.rstudio.com/shiny/
#
library(shiny)
techs <- function(car) mtcars[car,]
shinyServer(
function(input, output,session) {
updateSelectInput(session, "select", choices =... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/event.R
\name{ProcessEventSimOutput}
\alias{ProcessEventSimOutput}
\title{The main function for producing processed output for the package}
\usage{
ProcessEventSimOutput(eventSimOutput, eventSet)
}
\arguments{
\item{eventSimOutput}{The output... | /man/ProcessEventSimOutput.Rd | no_license | scientific-computing-solutions/badminton | R | false | true | 1,058 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/event.R
\name{ProcessEventSimOutput}
\alias{ProcessEventSimOutput}
\title{The main function for producing processed output for the package}
\usage{
ProcessEventSimOutput(eventSimOutput, eventSet)
}
\arguments{
\item{eventSimOutput}{The output... |
## 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() {
m
}
setinv <- fu... | /cachematrix.R | no_license | courseraCK/ProgrammingAssignment2 | R | false | false | 843 | 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() {
m
}
setinv <- fu... |
\name{LoadRegTypeLib}
\alias{LoadRegTypeLib}
\title{Load type library given UUID and version information}
\description{
Like \code{\link{LoadTypeLib}}, this function
loads a type library into R and returns a reference/handle
to it. However, how it finds the type library is different.
\code{\link{LoadTypeLib}} is ... | /man/LoadRegTypeLib.Rd | no_license | omegahat/SWinTypeLibs | R | false | false | 1,795 | rd | \name{LoadRegTypeLib}
\alias{LoadRegTypeLib}
\title{Load type library given UUID and version information}
\description{
Like \code{\link{LoadTypeLib}}, this function
loads a type library into R and returns a reference/handle
to it. However, how it finds the type library is different.
\code{\link{LoadTypeLib}} is ... |
source("00_read_and_clean.R")
library(foreign)
library(ggplot2)
library(reshape2)
library(maptools)
library(RColorBrewer)
# Map of municipalities in the peninsula, the Balearic Islands, Ceuta & Melilla
map_main <- readShapeSpatial("maps/SIANE_CARTO_BASE_S_3M/anual/20130101/mncp_peninsula.shp")
# I will use the Shape_A... | /02b_distribution_area.R | no_license | jcarlosmayo/spanish_demography | R | false | false | 3,856 | r | source("00_read_and_clean.R")
library(foreign)
library(ggplot2)
library(reshape2)
library(maptools)
library(RColorBrewer)
# Map of municipalities in the peninsula, the Balearic Islands, Ceuta & Melilla
map_main <- readShapeSpatial("maps/SIANE_CARTO_BASE_S_3M/anual/20130101/mncp_peninsula.shp")
# I will use the Shape_A... |
library(readr)
library(tm)
library(tidyr)
library(gtools)
#ADJUST FILENAME TO OUTPUT SCRAPER!! AND WRITE OUTPUT AS REQUIRED!
#cleaned <- read.csv("~/Desktop/final5.csv")
# cleaned <- cleaned[ grep("year", cleaned$article_time, invert = TRUE) , ]
# cleaned <- cleaned[ grep("years", cleaned$article_time, invert = TRUE)... | /Cleaning/text cleaning.R | no_license | Ubiqum-Project/project | R | false | false | 6,995 | r | library(readr)
library(tm)
library(tidyr)
library(gtools)
#ADJUST FILENAME TO OUTPUT SCRAPER!! AND WRITE OUTPUT AS REQUIRED!
#cleaned <- read.csv("~/Desktop/final5.csv")
# cleaned <- cleaned[ grep("year", cleaned$article_time, invert = TRUE) , ]
# cleaned <- cleaned[ grep("years", cleaned$article_time, invert = TRUE)... |
## need to refresh the datalist object, as it currently contains only the youngest age!!!
## datalist
##========================================================================================================
## stock without age information: naiveone
##================================================================... | /ForecastR_Phase-3_Release2/R Code/No Age/2. Evaluate Point Forecast Performance.r | no_license | avelez-espino/ForecastR_Phase3_Release2 | R | false | false | 140,175 | r |
## need to refresh the datalist object, as it currently contains only the youngest age!!!
## datalist
##========================================================================================================
## stock without age information: naiveone
##================================================================... |
# clean flow data for modeling
library(dplyr)
library(readr)
library(glue)
library(contentid)
library(janitor)
clean_flow_verona <- function(gageID="11425500") {
# get raw data ID:
flow <- contentid::store(glue("data_raw/raw_flow_usgs_{gageID}.csv"))
flow_file <- contentid::resolve("hash://sha256/1b36a8c933dc... | /scripts/functions/f_clean_flow_verona.R | no_license | jessicaguo/swg-21-connectivity | R | false | false | 504 | r | # clean flow data for modeling
library(dplyr)
library(readr)
library(glue)
library(contentid)
library(janitor)
clean_flow_verona <- function(gageID="11425500") {
# get raw data ID:
flow <- contentid::store(glue("data_raw/raw_flow_usgs_{gageID}.csv"))
flow_file <- contentid::resolve("hash://sha256/1b36a8c933dc... |
#k clustering in R
library(ISLR)
head(iris, 5)
#exploartory data analysis
library(ggplot2)
ggplot(iris, aes(x = Petal.Length, y = Petal.Width, color = Species)) +
geom_point(size = 4)
#modeling
set.seed(101)
irisCluster <- kmeans(iris[, 1:4], 3, nstart = 20)
irisCluster
table(irisCluster$cluster, iris$Species)
#v... | /R-Course-HTML-Notes-Training-ex_codes/k clustering notes.R | no_license | whosivan/R-BootCamp-ML- | R | false | false | 424 | r | #k clustering in R
library(ISLR)
head(iris, 5)
#exploartory data analysis
library(ggplot2)
ggplot(iris, aes(x = Petal.Length, y = Petal.Width, color = Species)) +
geom_point(size = 4)
#modeling
set.seed(101)
irisCluster <- kmeans(iris[, 1:4], 3, nstart = 20)
irisCluster
table(irisCluster$cluster, iris$Species)
#v... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute.PARz.R
\name{compute.PARz}
\alias{compute.PARz}
\title{Compute PAR at depth from surface irradiance (Ed0+) and profile of
downwelling irradiance (EdZ)}
\usage{
compute.PARz(
Depth,
waves,
Edz,
Ed.0,
f.PAR = c(0.001, 0.01, 0.... | /man/compute.PARz.Rd | no_license | belasi01/Cops | R | false | true | 1,375 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute.PARz.R
\name{compute.PARz}
\alias{compute.PARz}
\title{Compute PAR at depth from surface irradiance (Ed0+) and profile of
downwelling irradiance (EdZ)}
\usage{
compute.PARz(
Depth,
waves,
Edz,
Ed.0,
f.PAR = c(0.001, 0.01, 0.... |
##
# Author: Autogenerated on 2013-12-05 22:49:50
# gitHash: dbc23230f6666890a6cb7c4234e68e540e096e0c
# SEED: 779905237530228736
##
source('./findNSourceUtils.R')
complexFilterTest_test_44 <- function(conn) {
Log.info("A... | /R/tests/testdir_autoGen/runit_complexFilterTest_test_44.R | permissive | jmcclell/h2o | R | false | false | 1,707 | r | ##
# Author: Autogenerated on 2013-12-05 22:49:50
# gitHash: dbc23230f6666890a6cb7c4234e68e540e096e0c
# SEED: 779905237530228736
##
source('./findNSourceUtils.R')
complexFilterTest_test_44 <- function(conn) {
Log.info("A... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GLCM.R
\name{glcm}
\alias{glcm}
\title{Gray level co-occurrence matrix.}
\usage{
glcm(data, angle = 0, d = 1, n_grey = 32, normalize = TRUE, ...)
}
\arguments{
\item{data}{A numeric 2D matrix.}
\item{angle}{One of "0", "45", "90" or "135", t... | /man/glcm.Rd | no_license | cran/radiomics | R | false | true | 1,357 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GLCM.R
\name{glcm}
\alias{glcm}
\title{Gray level co-occurrence matrix.}
\usage{
glcm(data, angle = 0, d = 1, n_grey = 32, normalize = TRUE, ...)
}
\arguments{
\item{data}{A numeric 2D matrix.}
\item{angle}{One of "0", "45", "90" or "135", t... |
a <- 0.4 # alpha
b <- 0.3 # beta
g <- 0.2 # gamma
d <- -a-b-g # diagonal
nucleotides <- c('A', 'G', 'C', 'T')
transitionMatrix <- matrix(data=c(d, a, b, g, a, d, g, b, b, g, d, a, g, b, a, d), byrow=TRUE, nrow=4, dimnames=list(nucleotides, nucleotides))
print(eigen(transitionMatrix))
eigen(transitionMatrix)$vectors... | /HW5/30.R | no_license | WillMc93/EN.605.657 | R | false | false | 368 | r | a <- 0.4 # alpha
b <- 0.3 # beta
g <- 0.2 # gamma
d <- -a-b-g # diagonal
nucleotides <- c('A', 'G', 'C', 'T')
transitionMatrix <- matrix(data=c(d, a, b, g, a, d, g, b, b, g, d, a, g, b, a, d), byrow=TRUE, nrow=4, dimnames=list(nucleotides, nucleotides))
print(eigen(transitionMatrix))
eigen(transitionMatrix)$vectors... |
## NOTE ##
# Plot the barchart of cases generated by RF
# Quite the same with Extract_Cases_Country.R
## ---- ##
library(ggplot2)
library(tidyr)
cat('===== START [Extract_Cases_Country_RF.R] =====\n')
# Get directory of the script (this part only work if source the code, wont work if run directly in the console)
# T... | /Comparing_WHOIG/Extract_Cases_Country_RF.R | no_license | JieSun1990/JERFOUCRU | R | false | false | 4,305 | r | ## NOTE ##
# Plot the barchart of cases generated by RF
# Quite the same with Extract_Cases_Country.R
## ---- ##
library(ggplot2)
library(tidyr)
cat('===== START [Extract_Cases_Country_RF.R] =====\n')
# Get directory of the script (this part only work if source the code, wont work if run directly in the console)
# T... |
#' @name simulated_piecewise
#' @docType data
#' @aliases simulated_piecewise
#' @title Simulated Piecewise Time Series Dataset
#' @description This dataset is simulated from a piecewise autoregressive process (model (11), p. 1581, in Rosen et al. (2012)), see Examples.
#' @usage data(simulated_piecewise)
#' @format A ... | /R/simulated_piecewise_data.R | no_license | AndrewFerris/BayesSpec | R | false | false | 1,129 | r | #' @name simulated_piecewise
#' @docType data
#' @aliases simulated_piecewise
#' @title Simulated Piecewise Time Series Dataset
#' @description This dataset is simulated from a piecewise autoregressive process (model (11), p. 1581, in Rosen et al. (2012)), see Examples.
#' @usage data(simulated_piecewise)
#' @format A ... |
.onAttach <- function(libname, pkgname) {
f <- read.dcf(file.path(libname, pkgname, "DESCRIPTION"),
c("Version", "Date"))
packageStartupMessage("Successfully loaded stepR package version ", f[1,1],".\n",
"Several new functions are added in version 2.0-0.",
... | /fuzzedpackages/stepR/R/zzz.R | no_license | akhikolla/testpackages | R | false | false | 582 | r | .onAttach <- function(libname, pkgname) {
f <- read.dcf(file.path(libname, pkgname, "DESCRIPTION"),
c("Version", "Date"))
packageStartupMessage("Successfully loaded stepR package version ", f[1,1],".\n",
"Several new functions are added in version 2.0-0.",
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\name{ASquantFileInput}
\alias{ASquantFileInput}
\title{File input for alternative splicing quantification}
\usage{
ASquantFileInput(ASquantFileId, speciesId, assemblyId)
}
\arguments{
\item{ASquantFileId}{Character: identifier for alt... | /man/ASquantFileInput.Rd | no_license | zhangyupisa/psichomics | R | false | true | 620 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\name{ASquantFileInput}
\alias{ASquantFileInput}
\title{File input for alternative splicing quantification}
\usage{
ASquantFileInput(ASquantFileId, speciesId, assemblyId)
}
\arguments{
\item{ASquantFileId}{Character: identifier for alt... |
df <- subset(read.csv('household_power_consumption.txt', sep = ';', na.strings='?'), Date == '1/2/2007' | Date == '2/2/2007')
dateTime = strptime(paste(as.character(df$Date), as.character(df$Time)), format="%d/%m/%Y %H:%M:%S")
png(filename = "plot2.png", width = 480, height = 480)
plot(dateTime, df$Global_active_power... | /plot2.R | no_license | kras55/ExData_Plotting1 | R | false | false | 432 | r | df <- subset(read.csv('household_power_consumption.txt', sep = ';', na.strings='?'), Date == '1/2/2007' | Date == '2/2/2007')
dateTime = strptime(paste(as.character(df$Date), as.character(df$Time)), format="%d/%m/%Y %H:%M:%S")
png(filename = "plot2.png", width = 480, height = 480)
plot(dateTime, df$Global_active_power... |
data_tofix <- read.csv("Intern_intermed.csv", header = T, stringsAsFactors = F) %>%
mutate(other = as.numeric(other), sculp = as.numeric(sculp), gun = as.numeric(gun)) %>%
filter(name != "")
data_tofix[is.na(data_tofix)] <- 0
new_data <- data_tofix %>%
group_by(date, name) %>%
summarize(gun = sum(gun), sculp ... | /PiGuData/intern_intermed.R | no_license | amandawarlick/PigeonGuillemots | R | false | false | 407 | r | data_tofix <- read.csv("Intern_intermed.csv", header = T, stringsAsFactors = F) %>%
mutate(other = as.numeric(other), sculp = as.numeric(sculp), gun = as.numeric(gun)) %>%
filter(name != "")
data_tofix[is.na(data_tofix)] <- 0
new_data <- data_tofix %>%
group_by(date, name) %>%
summarize(gun = sum(gun), sculp ... |
## code to import power consumption data and generate plot 2 for first exploratory data assignment
## uses the sqldf package and assumes the 'household_power_consumption.txt' file is in the working directory
install.packages("sqldf")
library(sqldf)
## set file name
filename <- "household_power_consumption.txt"
## ... | /plot2.R | no_license | Karlos78/ExData_Plotting1 | R | false | false | 1,064 | r | ## code to import power consumption data and generate plot 2 for first exploratory data assignment
## uses the sqldf package and assumes the 'household_power_consumption.txt' file is in the working directory
install.packages("sqldf")
library(sqldf)
## set file name
filename <- "household_power_consumption.txt"
## ... |
####HOW TO DO PARALLEL COMPUTING ON R
library(parallel)
#Check parallel features
parallel::
#Linear Regression with Normal Eq
#Goal is to find the variabilty in estimates of B
b0=1
b1=5
siggma-10
n=10000L
set.seed(37)
x=runif(n)
#epsilon=sigma*rnorm(n)
#But if the errors are not normal then:
epsilon=sigma*rt(n... | /Parallel Computing in R.R | no_license | dlebron10/datasciencecoursera | R | false | false | 989 | r | ####HOW TO DO PARALLEL COMPUTING ON R
library(parallel)
#Check parallel features
parallel::
#Linear Regression with Normal Eq
#Goal is to find the variabilty in estimates of B
b0=1
b1=5
siggma-10
n=10000L
set.seed(37)
x=runif(n)
#epsilon=sigma*rnorm(n)
#But if the errors are not normal then:
epsilon=sigma*rt(n... |
\name{f_fit_gradient_logistic_01}
\alias{f_fit_gradient_logistic_01}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Fit Logistic Multivariate Regression Model with mactivate Using Gradient Descent
}
\description{
Use simple gradient descent to locate logistic model parameters, i.e., primary effe... | /man/f_fit_gradient_logistic_01.Rd | no_license | cran/mactivate | R | false | false | 6,135 | rd | \name{f_fit_gradient_logistic_01}
\alias{f_fit_gradient_logistic_01}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Fit Logistic Multivariate Regression Model with mactivate Using Gradient Descent
}
\description{
Use simple gradient descent to locate logistic model parameters, i.e., primary effe... |
# THIS FUNCTION TESTS THE gwj_analyze WITH AND WITHOUT WRAPPER AGAINST THE CURRENT IMPLEMENTATION OF T-TEST
# CURRENTLY SETUP = 0 (DEFAULT) AND SETUP = 1 ARE ONLY FUNCTIONAL
# SET THE TWO PATH ACCORDING TO WHERE THE CORRESPONDING FILES ARE LOCALLY ON YOUR MACHINE
library("testthat")
library("siever")
source("gwj_m... | /tests/testthat/test_gwj_analyze.R | permissive | pedlefsen/siever | R | false | false | 11,394 | r | # THIS FUNCTION TESTS THE gwj_analyze WITH AND WITHOUT WRAPPER AGAINST THE CURRENT IMPLEMENTATION OF T-TEST
# CURRENTLY SETUP = 0 (DEFAULT) AND SETUP = 1 ARE ONLY FUNCTIONAL
# SET THE TWO PATH ACCORDING TO WHERE THE CORRESPONDING FILES ARE LOCALLY ON YOUR MACHINE
library("testthat")
library("siever")
source("gwj_m... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hierarchicalbayes.R
\name{GetParameterStatistics}
\alias{GetParameterStatistics}
\title{GetParameterStatistics}
\usage{
GetParameterStatistics(stan.fit, parameter.names, n.classes)
}
\arguments{
\item{stan.fit}{A stanfit object.}
\item{param... | /man/GetParameterStatistics.Rd | no_license | NailKarimli/flipChoice | R | false | true | 537 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hierarchicalbayes.R
\name{GetParameterStatistics}
\alias{GetParameterStatistics}
\title{GetParameterStatistics}
\usage{
GetParameterStatistics(stan.fit, parameter.names, n.classes)
}
\arguments{
\item{stan.fit}{A stanfit object.}
\item{param... |
dat <- read.csv(textConnection("taxon_id,genus_species,plant_feeding,origin_Nearctic,origin_Neotropic,origin_European_Palearctic,origin_Asian_Palearctic,origin_Indomalaya,origin_Afrotropic,origin_Australasia,origin_Oceania,intentional_release,ever_introduced_anywhere,notes,host_type,established_indoors_or_outdoors,host... | /modefunctions.R | no_license | qdread/cyberhelp-stuff | R | false | false | 1,509 | r | dat <- read.csv(textConnection("taxon_id,genus_species,plant_feeding,origin_Nearctic,origin_Neotropic,origin_European_Palearctic,origin_Asian_Palearctic,origin_Indomalaya,origin_Afrotropic,origin_Australasia,origin_Oceania,intentional_release,ever_introduced_anywhere,notes,host_type,established_indoors_or_outdoors,host... |
#function to plot doubledecker plots from objects received from data_summary.R
#data structure fed to function must be a 2x2 table containing the total numbers of sick only, healthy only and sick&healthy users
#"sickness_state" takes values "sick", "healthy" or "random" and signifies the state that the users represente... | /ExploratoryAnalysis/functions/double_decker_plus.R | no_license | Watsonlevens/2016_TwitterEpi | R | false | false | 1,055 | r | #function to plot doubledecker plots from objects received from data_summary.R
#data structure fed to function must be a 2x2 table containing the total numbers of sick only, healthy only and sick&healthy users
#"sickness_state" takes values "sick", "healthy" or "random" and signifies the state that the users represente... |
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615837125-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 2,047 | r | testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_scalecols.R
\name{get_scalecols}
\alias{get_scalecols}
\title{Get scale columns}
\usage{
get_scalecols(data, scale_prefix)
}
\arguments{
\item{data}{a dataframe}
\item{scale_prefix}{a character string}
}
\value{
dataframe
}
\description{... | /man/get_scalecols.Rd | permissive | amacfarland/rscale | R | false | true | 534 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_scalecols.R
\name{get_scalecols}
\alias{get_scalecols}
\title{Get scale columns}
\usage{
get_scalecols(data, scale_prefix)
}
\arguments{
\item{data}{a dataframe}
\item{scale_prefix}{a character string}
}
\value{
dataframe
}
\description{... |
testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, 1837701012L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... | /IntervalSurgeon/inst/testfiles/rcpp_pile/AFL_rcpp_pile/rcpp_pile_valgrind_files/1609860198-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 729 | r | testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, 1837701012L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/readBorders.R
\name{readBorders}
\alias{readBorders}
\title{Shapefiles for Country and State Borders}
\usage{
\code{readBorders(Countries=TRUE,States=FALSE)}
}
\arguments{
\item{\code{Countries}}{logical defaults to \code{TRUE},}
\it... | /man/readBorders.Rd | no_license | MTHallworth/BBS_shapefile | R | false | false | 611 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/readBorders.R
\name{readBorders}
\alias{readBorders}
\title{Shapefiles for Country and State Borders}
\usage{
\code{readBorders(Countries=TRUE,States=FALSE)}
}
\arguments{
\item{\code{Countries}}{logical defaults to \code{TRUE},}
\it... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/select_edges_by_edge_id.R
\name{select_edges_by_edge_id}
\alias{select_edges_by_edge_id}
\title{Select edges in a graph using edge ID values}
\usage{
select_edges_by_edge_id(graph, edges, set_op = "union")
}
\arguments{
\item{graph}{a graph o... | /man/select_edges_by_edge_id.Rd | permissive | carlosal1015/DiagrammeR | R | false | true | 1,576 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/select_edges_by_edge_id.R
\name{select_edges_by_edge_id}
\alias{select_edges_by_edge_id}
\title{Select edges in a graph using edge ID values}
\usage{
select_edges_by_edge_id(graph, edges, set_op = "union")
}
\arguments{
\item{graph}{a graph o... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/putative_interactions.R
\name{putative_interactions}
\alias{putative_interactions}
\title{Create a tibble of consistently expressed ligands and receptors}
\usage{
putative_interactions(ligand.receptor.tibble, clusters, groups,
freq.group.in... | /man/putative_interactions.Rd | permissive | qizhengyang2017/celltalker | R | false | true | 1,700 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/putative_interactions.R
\name{putative_interactions}
\alias{putative_interactions}
\title{Create a tibble of consistently expressed ligands and receptors}
\usage{
putative_interactions(ligand.receptor.tibble, clusters, groups,
freq.group.in... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/writeln.R
\name{writeln}
\alias{writeln}
\title{Write a string to STDOUT without the standard '[1]' prefix.}
\usage{
writeln(..., sep = " ")
}
\arguments{
\item{...}{Strings to write to STDOUT}
\item{sep}{Separator to use between strings. De... | /src/_man/writeln.Rd | no_license | IKNL/vtg.glm | R | false | true | 462 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/writeln.R
\name{writeln}
\alias{writeln}
\title{Write a string to STDOUT without the standard '[1]' prefix.}
\usage{
writeln(..., sep = " ")
}
\arguments{
\item{...}{Strings to write to STDOUT}
\item{sep}{Separator to use between strings. De... |
context("Client & service initialization")
test_that("resolver_endpoint", {
endpoints <- list(
"*" = "{service}.{region}.amazonaws.com",
"us-east-*" = "https://{service}.amazonaws.com",
"us-west-*" = "http://us-west.amazonaws.com"
)
r <- resolver_endpoint("service", "region", endpoints)
expect_equ... | /paws.common/tests/testthat/test_client.R | permissive | peoplecure/paws | R | false | false | 593 | r | context("Client & service initialization")
test_that("resolver_endpoint", {
endpoints <- list(
"*" = "{service}.{region}.amazonaws.com",
"us-east-*" = "https://{service}.amazonaws.com",
"us-west-*" = "http://us-west.amazonaws.com"
)
r <- resolver_endpoint("service", "region", endpoints)
expect_equ... |
##' @description geno_plink is a function which can convert genotype data to PLINK data
##' @title a tool converting genotype data to PLINK format
##' @param genoRaw a dataframe or matrix is genotype data from ilumina device,
##' which have two parts: the first colname represented snps name and '...' re... | /R/geno_plink.R | no_license | Feng-Zhang/genoPLINK | R | false | false | 2,534 | r |
##' @description geno_plink is a function which can convert genotype data to PLINK data
##' @title a tool converting genotype data to PLINK format
##' @param genoRaw a dataframe or matrix is genotype data from ilumina device,
##' which have two parts: the first colname represented snps name and '...' re... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/indexIfNoneFound.R
\name{indexIfNoneFound}
\alias{indexIfNoneFound}
\title{helper function for findDupes}
\usage{
indexIfNoneFound(fastaFile)
}
\arguments{
\item{fastaFile}{the name of the FASTA file
return the index, invisibly}
}
\descrip... | /TxDbLite/man/indexIfNoneFound.Rd | permissive | arcolombo/Arkas-RNAseq | R | false | true | 359 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/indexIfNoneFound.R
\name{indexIfNoneFound}
\alias{indexIfNoneFound}
\title{helper function for findDupes}
\usage{
indexIfNoneFound(fastaFile)
}
\arguments{
\item{fastaFile}{the name of the FASTA file
return the index, invisibly}
}
\descrip... |
# Mon Mar 27 15:18:53 PDT 2017
#
# Given a huge matrix in X.csv file, create a prediction vector and save to
# Y.csv
#
# $ time Rscript predictY.R
# Error in fread(lines) :
# File '-0.367218074389214,1.94459610074338,0.333589661913799' does not exist. Include one or more spaces to consider the input a system command.... | /proposal/predict/predictY_datatable.R | no_license | clarkfitzg/phd_research | R | false | false | 3,418 | r | # Mon Mar 27 15:18:53 PDT 2017
#
# Given a huge matrix in X.csv file, create a prediction vector and save to
# Y.csv
#
# $ time Rscript predictY.R
# Error in fread(lines) :
# File '-0.367218074389214,1.94459610074338,0.333589661913799' does not exist. Include one or more spaces to consider the input a system command.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gregElasticNet.R
\name{gregElasticNet}
\alias{gregElasticNet}
\title{Compute an elastic net regression estimator}
\usage{
gregElasticNet(
y,
xsample,
xpop,
pi = NULL,
alpha = 1,
model = "linear",
pi2 = NULL,
var_est = FALSE,
... | /man/gregElasticNet.Rd | no_license | rgcardos/mase | R | false | true | 4,020 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gregElasticNet.R
\name{gregElasticNet}
\alias{gregElasticNet}
\title{Compute an elastic net regression estimator}
\usage{
gregElasticNet(
y,
xsample,
xpop,
pi = NULL,
alpha = 1,
model = "linear",
pi2 = NULL,
var_est = FALSE,
... |
Factor = list();
Factor$CS = 1;#4.3;
Factor$Tint = 1;
Factor$Slope = 1;
Factor$Current = 1; Factor$ErrorStD = 1;
Factor$LoseProb = 1;
Factor$SlpStD = 1 #This one raises slope sd additionally to the Factor$LoseProb
| /TestParameters.R | no_license | yurval/TRIC | R | false | false | 217 | r |
Factor = list();
Factor$CS = 1;#4.3;
Factor$Tint = 1;
Factor$Slope = 1;
Factor$Current = 1; Factor$ErrorStD = 1;
Factor$LoseProb = 1;
Factor$SlpStD = 1 #This one raises slope sd additionally to the Factor$LoseProb
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{update_snip}
\alias{update_snip}
\title{Function wrapper to update snippet}
\usage{
update_snip(fname, f)
}
\arguments{
\item{fname}{File name of snippet}
\item{f}{Function to apply to the snippet}
}
\description{
Function ... | /man/update_snip.Rd | no_license | bobbeltje/snippie | R | false | true | 348 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{update_snip}
\alias{update_snip}
\title{Function wrapper to update snippet}
\usage{
update_snip(fname, f)
}
\arguments{
\item{fname}{File name of snippet}
\item{f}{Function to apply to the snippet}
}
\description{
Function ... |
library(dplyr)
library(readxl)
#--------- Read data ------------------------#
oecd <- read_xls("c:/Users/Campanell/Downloads/oecd.xls",skip=3,n_max=42) %>%
rename(country = 2) %>%
select(country,ends_with('0'))
#------- Highest fertility rate in 2000 -------------#
max_2000 <- oecd %>%
... | /R/basic_summary.R | permissive | campanell/data_science_live | R | false | false | 901 | r | library(dplyr)
library(readxl)
#--------- Read data ------------------------#
oecd <- read_xls("c:/Users/Campanell/Downloads/oecd.xls",skip=3,n_max=42) %>%
rename(country = 2) %>%
select(country,ends_with('0'))
#------- Highest fertility rate in 2000 -------------#
max_2000 <- oecd %>%
... |
args <- commandArgs(TRUE)
options(warn=-1)
#get dataURL
dataURL<-as.character(args[1])
#header true or false
header<-as.logical(args[2])
#read data
d<-read.csv(dataURL,header = header,na.strings = c("?"))
d <- na.omit(d)
# which one is the class attribute
colnumber <- as.integer(args[3])
#get name of the class variable... | /Comparison Of Classifiers/assignment4.R | no_license | khushbup7/Machine_Learning_Algorithms | R | false | false | 5,063 | r | args <- commandArgs(TRUE)
options(warn=-1)
#get dataURL
dataURL<-as.character(args[1])
#header true or false
header<-as.logical(args[2])
#read data
d<-read.csv(dataURL,header = header,na.strings = c("?"))
d <- na.omit(d)
# which one is the class attribute
colnumber <- as.integer(args[3])
#get name of the class variable... |
library(dplyr)
library(ids) ##for making random claim numbers
library(purrr)
library(lubridate)
library(tidyr)
library(ggplot2)
gen_ult_claim <- function(n) {
##simulate n lognormally distributed ultimate claim values
rlnorm(n, 10, 2)
}
gen_num_tran <- function(n) {
##simulate n many transaction counts
## cu... | /R/claim_transaction_sim.R | permissive | alex-pax/claims_transaction_sim | R | false | false | 6,415 | r | library(dplyr)
library(ids) ##for making random claim numbers
library(purrr)
library(lubridate)
library(tidyr)
library(ggplot2)
gen_ult_claim <- function(n) {
##simulate n lognormally distributed ultimate claim values
rlnorm(n, 10, 2)
}
gen_num_tran <- function(n) {
##simulate n many transaction counts
## cu... |
context("pcl")
test_that("pcl", {
dat <- pcl
# checks for outliers
expect_true(all(dat$can.max.ht < 60))
expect_true(all(dat$rugosity < 100))
expect_true(all(dat$vai.max <= 8))
})
| /tests/testthat/test_pcl_range.R | permissive | atkinsjeff/pcl | R | false | false | 192 | r | context("pcl")
test_that("pcl", {
dat <- pcl
# checks for outliers
expect_true(all(dat$can.max.ht < 60))
expect_true(all(dat$rugosity < 100))
expect_true(all(dat$vai.max <= 8))
})
|
## The function read_outcome reads the measure for the outcome on hospital data
## and stores it in a datatable
## it also converts the outcome for "heart attack", "heart failure" and "pneumonia"
## to numeric values
## for simplification purposes, only the interest columns are saved. These are:
## outcome[,2] ->... | /R_Programing/program-assignment3/rankall-prototype.R | no_license | gfilippini/datasciencecoursera | R | false | false | 2,644 | r |
## The function read_outcome reads the measure for the outcome on hospital data
## and stores it in a datatable
## it also converts the outcome for "heart attack", "heart failure" and "pneumonia"
## to numeric values
## for simplification purposes, only the interest columns are saved. These are:
## outcome[,2] ->... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.