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
# chi_square_against_Rho indep <- c(0.06,0.3,0.24,0.04,0.2,0.16) t_1 <- matrix(indep,nrow = 2, ncol = 3, byrow = TRUE) a <- t_1[1,1]; b <- t_1[1,2]; c <- t_1[1,3] d <- t_1[2,1]; e <- t_1[2,2]; f <- t_1[2,3] x <- rchisq(1000, 5/2) hist(t_2, prob=TRUE, xlab = "") curve(dchisq(x, df=2), col='green', add=TRUE) curve(d...
/R/chi_square_against_Rho.R
no_license
wathenmj/marpalSVD
R
false
false
623
r
# chi_square_against_Rho indep <- c(0.06,0.3,0.24,0.04,0.2,0.16) t_1 <- matrix(indep,nrow = 2, ncol = 3, byrow = TRUE) a <- t_1[1,1]; b <- t_1[1,2]; c <- t_1[1,3] d <- t_1[2,1]; e <- t_1[2,2]; f <- t_1[2,3] x <- rchisq(1000, 5/2) hist(t_2, prob=TRUE, xlab = "") curve(dchisq(x, df=2), col='green', add=TRUE) curve(d...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pairwiseLinearFit.R \name{pairwiseDemingRegression} \alias{pairwiseDemingRegression} \title{Pairwise Deming regression fits between genes} \usage{ pairwiseDemingRegression(X) } \arguments{ \item{X}{matrix, given gene expression dataset, rows ...
/man/pairwiseDemingRegression.Rd
no_license
ctlab/ClusDec
R
false
true
467
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pairwiseLinearFit.R \name{pairwiseDemingRegression} \alias{pairwiseDemingRegression} \title{Pairwise Deming regression fits between genes} \usage{ pairwiseDemingRegression(X) } \arguments{ \item{X}{matrix, given gene expression dataset, rows ...
# Top --------------------------------------------------------------------- setwd('C:/Users/Ingrid/Documents/Master - Sustherb/LidarMoose') getwd() require(lidR) require(raster) require(rasterVis) require(rgeos) plotcoords<-read.csv('data/troendelag_20m_flater_pkt.csv',header=T,sep=';',dec=',') plotcoords_telemark<-...
/R/Clipping_script_32x32.R
permissive
JamesDMSpeed/LidarMoose
R
false
false
95,516
r
# Top --------------------------------------------------------------------- setwd('C:/Users/Ingrid/Documents/Master - Sustherb/LidarMoose') getwd() require(lidR) require(raster) require(rasterVis) require(rgeos) plotcoords<-read.csv('data/troendelag_20m_flater_pkt.csv',header=T,sep=';',dec=',') plotcoords_telemark<-...
#Exercise to reassign all transport revenue to fuel taxes. #2 scenarios, one in which Q is fixed, one where Q responds to P. #Assumptions: 1. No cross-substitution from petrol to diesel or vice versa (shares stay fixed). # 2. setwd("~/OECD/Decomposition") oecd <- read.csv("oecd.csv") #All values in domestic currency....
/fuelsimulation.r
no_license
mjgcos/transportwork
R
false
false
4,928
r
#Exercise to reassign all transport revenue to fuel taxes. #2 scenarios, one in which Q is fixed, one where Q responds to P. #Assumptions: 1. No cross-substitution from petrol to diesel or vice versa (shares stay fixed). # 2. setwd("~/OECD/Decomposition") oecd <- read.csv("oecd.csv") #All values in domestic currency....
folderpath = "" functionpath = "MechanismsUnderpinningCommunityStability/Rcode Structural Equation Model/PlottingFunctions.R" datapath = "MechanismsUnderpinningCommunityStability/Data/CommunityList.rds" stanpath = "MechanismsUnderpinningCommunityStability/Stan code Correlations/" source(paste0(folderpath,functionpath...
/Rcode Correlations/Cor4.r
no_license
LukeChristopherEvans/MechanismsUnderpinningCommunityStability
R
false
false
990
r
folderpath = "" functionpath = "MechanismsUnderpinningCommunityStability/Rcode Structural Equation Model/PlottingFunctions.R" datapath = "MechanismsUnderpinningCommunityStability/Data/CommunityList.rds" stanpath = "MechanismsUnderpinningCommunityStability/Stan code Correlations/" source(paste0(folderpath,functionpath...
# slugs ------------------------------------------------------------------- dictionary_boxscore_slugs <- function(){ data_frame(nameSlug = c("traditional", "advanced", "scoring","misc", "usage", "four factors", "hustle", "tracking", "winprob"), slugNBA = c("boxscoretrad...
/R/box_scores.R
no_license
deepthought97/nbastatR
R
false
false
7,787
r
# slugs ------------------------------------------------------------------- dictionary_boxscore_slugs <- function(){ data_frame(nameSlug = c("traditional", "advanced", "scoring","misc", "usage", "four factors", "hustle", "tracking", "winprob"), slugNBA = c("boxscoretrad...
rm(list=ls()) #This is the main model library(data.table) load("startingvalues/model2_startvalues.rdata") #starting values from a global routine colnames(ZG)[1] <- "const" start <- deTest$optim$bestmem names(start) <- c(paste("lambdaR:",colnames(XR), sep=""), paste("lambdaG:",colnames(XG), sep="...
/model2_fit.R
no_license
ccrismancox/JPR_reputation4resolve
R
false
false
733
r
rm(list=ls()) #This is the main model library(data.table) load("startingvalues/model2_startvalues.rdata") #starting values from a global routine colnames(ZG)[1] <- "const" start <- deTest$optim$bestmem names(start) <- c(paste("lambdaR:",colnames(XR), sep=""), paste("lambdaG:",colnames(XG), sep="...
# 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/ # #install.packages('shiny', repos = 'http://cran.us.r-project.org') library(shiny) #install.packages('ggplot2', repos = 'http://cran.us.r-project.org'...
/server.R
no_license
AisuluuK/Final-Project-Shiny
R
false
false
5,320
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/ # #install.packages('shiny', repos = 'http://cran.us.r-project.org') library(shiny) #install.packages('ggplot2', repos = 'http://cran.us.r-project.org'...
IVT <- function(t, x, y, settings) { filterMarkers <- settings$filterMarkers VT <- settings$VT angular <- settings$angular screenDist <- settings$screenDistance screenResolution <- settings$screenResolution screenSize <- settings$screenSize postProcess <- settings$postProcess markerNames <- settings$ma...
/Shiny/Functions/detectors/IVT.R
no_license
deslion/EyeTrackingProject
R
false
false
12,775
r
IVT <- function(t, x, y, settings) { filterMarkers <- settings$filterMarkers VT <- settings$VT angular <- settings$angular screenDist <- settings$screenDistance screenResolution <- settings$screenResolution screenSize <- settings$screenSize postProcess <- settings$postProcess markerNames <- settings$ma...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prg_plot.R \name{prg_plot} \alias{prg_plot} \title{Produce a precision-recall Gain plot for a set of predicted probabilities for a binary classifier. Follows the paper by Flach and Kull: https://proceedings.neurips.cc/paper/2015/file/33e8075e...
/man/prg_plot.Rd
no_license
gweissman/gmish
R
false
true
1,662
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prg_plot.R \name{prg_plot} \alias{prg_plot} \title{Produce a precision-recall Gain plot for a set of predicted probabilities for a binary classifier. Follows the paper by Flach and Kull: https://proceedings.neurips.cc/paper/2015/file/33e8075e...
## ## ## ## ## ## ## ## ## ## --------------------------------------------------- library(raster) library(fields) testImg <- raster("D:/NADCA/processed/D0276.tif") plot(testImg) ti2 <- crop(testImg, extent(testImg, rowFromY(testImg, 4000), rowFromY(testImg, 3700), 200, 900)) plot(ti2) contour(ti2, add=T) xline(...
/poreMorphology/demos/scrapWork.R
no_license
dnychka/Coupons
R
false
false
378
r
## ## ## ## ## ## ## ## ## ## --------------------------------------------------- library(raster) library(fields) testImg <- raster("D:/NADCA/processed/D0276.tif") plot(testImg) ti2 <- crop(testImg, extent(testImg, rowFromY(testImg, 4000), rowFromY(testImg, 3700), 200, 900)) plot(ti2) contour(ti2, add=T) xline(...
context("ID columns") describe("idCols", { it("returns the ID columns of a table", { mydata <- data.table(area = "fr", timeId = 1, LOAD = 1000) expect_equal(idCols(mydata), c("area", "timeId")) }) }) describe("addIdCol", { it("declares new ID cols", { addIdCol("dayOfWeek") expect_true("dayOfWeek...
/tests/testthat/test-id_cols.R
no_license
rte-antares-rpackage/antaresDev
R
false
false
731
r
context("ID columns") describe("idCols", { it("returns the ID columns of a table", { mydata <- data.table(area = "fr", timeId = 1, LOAD = 1000) expect_equal(idCols(mydata), c("area", "timeId")) }) }) describe("addIdCol", { it("declares new ID cols", { addIdCol("dayOfWeek") expect_true("dayOfWeek...
## These functions are used to create the inverse of a given matrix and cache this matrix ## The function makeCacheMatrix stores a given matrix (x) ## And it makes it possible to store (using setInvert) and retrieve (using getInvert) the stored the inverse of this matrix makeCacheMatrix <- function(x = matrix()) { m ...
/cachematrix.R
no_license
nreijmer/ProgrammingAssignment2
R
false
false
1,095
r
## These functions are used to create the inverse of a given matrix and cache this matrix ## The function makeCacheMatrix stores a given matrix (x) ## And it makes it possible to store (using setInvert) and retrieve (using getInvert) the stored the inverse of this matrix makeCacheMatrix <- function(x = matrix()) { m ...
source("../tools.R") DAYS_IN_MONTH = 30.44 library( survival ) ipd <- lung[,c("time","status")] ipd$time <- ipd$time / DAYS_IN_MONTH ipd$treat <- 1 fit <- survfit( Surv(ipd$time, ipd$status)~1 ) dataset <- data.frame( time=summary(fit)$time, prop=summary(fit)$surv ) p_min <- Inf dev <- function( x, N=228 ){ if...
/figures/model-fits/code/fit-lung.R
permissive
jtextor/insilico-trials
R
false
false
1,607
r
source("../tools.R") DAYS_IN_MONTH = 30.44 library( survival ) ipd <- lung[,c("time","status")] ipd$time <- ipd$time / DAYS_IN_MONTH ipd$treat <- 1 fit <- survfit( Surv(ipd$time, ipd$status)~1 ) dataset <- data.frame( time=summary(fit)$time, prop=summary(fit)$surv ) p_min <- Inf dev <- function( x, N=228 ){ if...
require(graphics) plot4 <- function() { # Call download_data.R to get the data on 2007/2/1 and 2007/2/2 source("download_data.R") f_data <- download_data() # plot the global active power v.s. frequency png("plot4.png", width=480, height=480) # combine the Date/Time column to a single column ...
/plot4.R
no_license
jjtt8080/ExData_Plotting1
R
false
false
1,255
r
require(graphics) plot4 <- function() { # Call download_data.R to get the data on 2007/2/1 and 2007/2/2 source("download_data.R") f_data <- download_data() # plot the global active power v.s. frequency png("plot4.png", width=480, height=480) # combine the Date/Time column to a single column ...
\name{dist.latlon} \alias{dist.latlon} %- Also NEED an '\alias' for EACH other topic documented here. \title{ A function to get a distance matrix from a points matrix in longitude latitude} \description{ Take a n x 3 points matrix and convert it to a m x 3 distance matrix. First column of points matrix...
/man/dist.latlon.Rd
permissive
pnandak/latlon
R
false
false
1,455
rd
\name{dist.latlon} \alias{dist.latlon} %- Also NEED an '\alias' for EACH other topic documented here. \title{ A function to get a distance matrix from a points matrix in longitude latitude} \description{ Take a n x 3 points matrix and convert it to a m x 3 distance matrix. First column of points matrix...
###### Initialise variables and load functionality #####GeneNr source("plot-util.R") source("util-asc.R") ##### set paths and libraries mmseqpath="src/mmseq-latest/" myset="bow-mmseqEnsg84-runCut-20161121" mmset=myset mydate="161121" choosecols=c("ivory3","orange", "red") choosecolsgenes=c("steelblue3","yellow", "red...
/R/mains/asc/asc_otherPlots.R
no_license
penglbio/Areg
R
false
false
34,218
r
###### Initialise variables and load functionality #####GeneNr source("plot-util.R") source("util-asc.R") ##### set paths and libraries mmseqpath="src/mmseq-latest/" myset="bow-mmseqEnsg84-runCut-20161121" mmset=myset mydate="161121" choosecols=c("ivory3","orange", "red") choosecolsgenes=c("steelblue3","yellow", "red...
#split input and output x <- dataset[,1:4] y <- dataset[,5] #boxplot for each attribute on one image par(mfrow=c(1,4)) for(i in 1:4) { boxplot(x[,i], main=names(iris)[i]) } #barplot for class breakdown plot(y) #scatterplot matrix featurePlot(x=x, y=y, plot="ellipse") #box and whisker plots for each attribute featureP...
/plots.R
no_license
Javacream/org.javacream.training.machine_learning
R
false
false
513
r
#split input and output x <- dataset[,1:4] y <- dataset[,5] #boxplot for each attribute on one image par(mfrow=c(1,4)) for(i in 1:4) { boxplot(x[,i], main=names(iris)[i]) } #barplot for class breakdown plot(y) #scatterplot matrix featurePlot(x=x, y=y, plot="ellipse") #box and whisker plots for each attribute featureP...
#' @title Pencil Layer #' @name getPencilLayer #' @description Create a pencil layer. This function transforms a POLYGON or #' MULTIPOLYGON sf object into a MULTILINESTRING one. #' @param x an sf object, a simple feature collection (POLYGON or MULTIPOLYGON). #' @param size density of the penciling. Median number of ...
/R/getPencilLayer.R
no_license
xclu/cartography
R
false
false
2,522
r
#' @title Pencil Layer #' @name getPencilLayer #' @description Create a pencil layer. This function transforms a POLYGON or #' MULTIPOLYGON sf object into a MULTILINESTRING one. #' @param x an sf object, a simple feature collection (POLYGON or MULTIPOLYGON). #' @param size density of the penciling. Median number of ...
# function calls for comparison of networks setwd("~/MAARS_p2/MB") library(reshape) library(ggplot2) library("RColorBrewer") ######################################################################################### # set of functions for fixing the module names and realigning them to the control modules ###############...
/Scripts/analysis_functions.R
no_license
gazwb/compositionalCor_v3
R
false
false
33,962
r
# function calls for comparison of networks setwd("~/MAARS_p2/MB") library(reshape) library(ggplot2) library("RColorBrewer") ######################################################################################### # set of functions for fixing the module names and realigning them to the control modules ###############...
data(gala,package="faraway") library(MASS) lmod <- lm(burntime ~ nitrogen + chlorine + potassium, leafburn) logtrans(lmod,plotit=TRUE,alpha=seq(-min(leafburn$burntime) + 0.001,0,by=0.01)) ## Broken Stick Regression lmod1 <- lm(sr ~ pop15, savings, subset= (pop15 < 35)) lmod2 <- lm(sr ~ pop15, savings, subse...
/Stats4ANS_Fall2019_prev/lab5_Onewayanova/Transformation.R
no_license
liulihe954/ANS6905_ANS_Stats_2019
R
false
false
1,800
r
data(gala,package="faraway") library(MASS) lmod <- lm(burntime ~ nitrogen + chlorine + potassium, leafburn) logtrans(lmod,plotit=TRUE,alpha=seq(-min(leafburn$burntime) + 0.001,0,by=0.01)) ## Broken Stick Regression lmod1 <- lm(sr ~ pop15, savings, subset= (pop15 < 35)) lmod2 <- lm(sr ~ pop15, savings, subse...
get.weights <- function(ps1, stop.method = "wcor", withSampW = TRUE) { w <- with(ps1, ps.num/ps.den) if(withSampW) w <- w * ps1$sampw return(w) if(!(class(ps1) %in% c('ps.cont'))) stop("The object 'ps1' must be of class 'ps.cont'.") }
/R/get.weights.R
no_license
cran/twangContinuous
R
false
false
250
r
get.weights <- function(ps1, stop.method = "wcor", withSampW = TRUE) { w <- with(ps1, ps.num/ps.den) if(withSampW) w <- w * ps1$sampw return(w) if(!(class(ps1) %in% c('ps.cont'))) stop("The object 'ps1' must be of class 'ps.cont'.") }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sof.bukin.n6.R \name{makeBukinN6Function} \alias{makeBukinN6Function} \title{Bukin function N. 6} \usage{ makeBukinN6Function() } \value{ [\code{smoof_single_objective_function}] } \description{ Beside Bukin N. 2 and N. 4 this is the last \dQ...
/man/makeBukinN6Function.Rd
no_license
mllg/smoof
R
false
true
780
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sof.bukin.n6.R \name{makeBukinN6Function} \alias{makeBukinN6Function} \title{Bukin function N. 6} \usage{ makeBukinN6Function() } \value{ [\code{smoof_single_objective_function}] } \description{ Beside Bukin N. 2 and N. 4 this is the last \dQ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/build_lcm.R \name{build_lcm} \alias{build_lcm} \title{Build a Latent Class Model} \usage{ build_lcm(observations, n_clusters, emission_probs, formula, data, coefficients, cluster_names = NULL, channel_names = NULL) } \arguments{ \item{obser...
/man/build_lcm.Rd
no_license
zhouyonglong/seqHMM
R
false
true
6,044
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/build_lcm.R \name{build_lcm} \alias{build_lcm} \title{Build a Latent Class Model} \usage{ build_lcm(observations, n_clusters, emission_probs, formula, data, coefficients, cluster_names = NULL, channel_names = NULL) } \arguments{ \item{obser...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.r \docType{methods} \name{show,SpatialPolygonsDataFrame-method} \alias{show,SpatialPolygonsDataFrame-method} \alias{show,SpatialLinesDataFrame-method} \alias{show,SpatialPointsDataFrame-method} \alias{print,Spatial-method} \title{sp met...
/man/sp-methods.Rd
no_license
nemochina2008/spbabel
R
false
true
636
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.r \docType{methods} \name{show,SpatialPolygonsDataFrame-method} \alias{show,SpatialPolygonsDataFrame-method} \alias{show,SpatialLinesDataFrame-method} \alias{show,SpatialPointsDataFrame-method} \alias{print,Spatial-method} \title{sp met...
lnm <- function(...){ lvm(...,latent = "ggm", residual = "cov") }
/R/a_models_lnm.R
no_license
SachaEpskamp/psychonetrics
R
false
false
68
r
lnm <- function(...){ lvm(...,latent = "ggm", residual = "cov") }
setwd("/Users/martinjohnhadley/Desktop/temp") long.df <- worldbank_wide_to_long(file = "target.csv") write.csv(file = "long-export.csv", long.df)
/InteractiveViz-with_TableauPublic/Scripts/convert.R
permissive
charliejhadley/OxfordIDN_Talks
R
false
false
148
r
setwd("/Users/martinjohnhadley/Desktop/temp") long.df <- worldbank_wide_to_long(file = "target.csv") write.csv(file = "long-export.csv", long.df)
#K.Palof # ADF&G 8-3-16 updated for Seymour Canal / updated 8-8-17 # code to process data from Ocean AK to use in crab CSA models. # # Current year: 2017 rm(list = ls())# clear workspace from previous area #####Load Packages --------------------------------- library(tidyverse) library(stringr) library(reshape2) ...
/code/RKCcode/2017/SCprocessingCODE.R
no_license
kjpalof/crab_data_processing
R
false
false
15,534
r
#K.Palof # ADF&G 8-3-16 updated for Seymour Canal / updated 8-8-17 # code to process data from Ocean AK to use in crab CSA models. # # Current year: 2017 rm(list = ls())# clear workspace from previous area #####Load Packages --------------------------------- library(tidyverse) library(stringr) library(reshape2) ...
#### Grafico circular "Este guion reproduce el grafico circular que se expone en pagina 7 del informe 2019. Muestra migrantes en 2019 segun continente que inhabitan". library(ggplot2) library(dplyr) library(RColorBrewer) datos <- data.frame(Country = c("Asia", "Europe", "North America", ...
/1.GraficosEjemplos/1. Grafico_Circular/Grafico_circular.R
no_license
JamesAttwood1910/proyectoJSM
R
false
false
2,832
r
#### Grafico circular "Este guion reproduce el grafico circular que se expone en pagina 7 del informe 2019. Muestra migrantes en 2019 segun continente que inhabitan". library(ggplot2) library(dplyr) library(RColorBrewer) datos <- data.frame(Country = c("Asia", "Europe", "North America", ...
setwd("C:/Users/liuli/workspace/asset-allocation") source("macro_wind.R") source("getdata.R") source("dataproc.R") library("MASS") situation<-c("指标环比上升","指标环比下降","指标处于历史高位(高于半年均值)","指标处于历史低位(低于半年均值)","指标创新高(高于半年最高值)","指标创新低(低于半年最低值)") sit<-factor(situation) mark1<-matrix(nrow = nrow(data),ncol = ncol(data)) mark2<-ma...
/R/asset-allocation/macro_main.R
no_license
timedcy/workspace
R
false
false
2,517
r
setwd("C:/Users/liuli/workspace/asset-allocation") source("macro_wind.R") source("getdata.R") source("dataproc.R") library("MASS") situation<-c("指标环比上升","指标环比下降","指标处于历史高位(高于半年均值)","指标处于历史低位(低于半年均值)","指标创新高(高于半年最高值)","指标创新低(低于半年最低值)") sit<-factor(situation) mark1<-matrix(nrow = nrow(data),ncol = ncol(data)) mark2<-ma...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/doRedis.R \name{logger} \alias{logger} \title{Print a timestamped message to the standard error stream.} \usage{ logger(msg) } \arguments{ \item{msg}{a character message to print to the standard error stream} } \value{ The character string t...
/man/logger.Rd
no_license
bomeara/doRedis
R
false
true
435
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/doRedis.R \name{logger} \alias{logger} \title{Print a timestamped message to the standard error stream.} \usage{ logger(msg) } \arguments{ \item{msg}{a character message to print to the standard error stream} } \value{ The character string t...
# Set initial R0 and Rt at future time points setR0 <- function(R0, reduction1, reduction2){ c(R0, R0 * (1 - reduction1), R0 * (1 - reduction2)) } # Specify the country chosen to represent each income group get_representative_country <- function(income_group){ case_when(income_group == "HIC" ~ "Malta", ...
/R/functions.R
permissive
lsempe77/covid_vaccine_allocation
R
false
false
16,426
r
# Set initial R0 and Rt at future time points setR0 <- function(R0, reduction1, reduction2){ c(R0, R0 * (1 - reduction1), R0 * (1 - reduction2)) } # Specify the country chosen to represent each income group get_representative_country <- function(income_group){ case_when(income_group == "HIC" ~ "Malta", ...
hier <- function(df,normalize=TRUE,groupNum=0){ #Functions----------------------------------------------------------------------------------------------------- newP1 <- function(p1, p2) { #Calculate the point average p1[1:(length(p1)-2)] <- (t(p1[1:(length(p1)-2)])*p2[rep(length(p2),length(p2)-2)] + t(p2[1:...
/Hierarchical.R
no_license
JenYinChao/Implementation-of-Clustering-Analysis
R
false
false
2,657
r
hier <- function(df,normalize=TRUE,groupNum=0){ #Functions----------------------------------------------------------------------------------------------------- newP1 <- function(p1, p2) { #Calculate the point average p1[1:(length(p1)-2)] <- (t(p1[1:(length(p1)-2)])*p2[rep(length(p2),length(p2)-2)] + t(p2[1:...
#' @include get_pca.R NULL #' Visualize Principal Component Analysis #' #' @description #' Graph of individuals/variables from the output of Principal Component Analysis (PCA). \cr\cr #' \itemize{ #' \item{fviz_pca_ind(): Graph of individuals} #' \item{fviz_pca_var(): Graph of variables} #' \item{fviz_pca_biplot(): B...
/R/fviz_pca.R
no_license
lioutasb/factoextra
R
false
false
24,778
r
#' @include get_pca.R NULL #' Visualize Principal Component Analysis #' #' @description #' Graph of individuals/variables from the output of Principal Component Analysis (PCA). \cr\cr #' \itemize{ #' \item{fviz_pca_ind(): Graph of individuals} #' \item{fviz_pca_var(): Graph of variables} #' \item{fviz_pca_biplot(): B...
require("princyr") || stop("unable to load princyr") BiocGenerics:::testPackage("princyr")
/tests/runTests.R
no_license
lwaldron/princyr
R
false
false
91
r
require("princyr") || stop("unable to load princyr") BiocGenerics:::testPackage("princyr")
library(ggplot2) # global variables: plot_theme, m (initialized below) # ---------------- # ggplot theming plot_theme <- theme_bw(base_size=10,base_family="sans") setwd("~/Documents/research/20c/hls/tmhls") if(!exists("m")) { source("analyze_model.R") m <- do.call(analyze_model,model_files("hls_k150_v100K...
/explore/time_plotting.R
no_license
pnandak/tmhls
R
false
false
4,180
r
library(ggplot2) # global variables: plot_theme, m (initialized below) # ---------------- # ggplot theming plot_theme <- theme_bw(base_size=10,base_family="sans") setwd("~/Documents/research/20c/hls/tmhls") if(!exists("m")) { source("analyze_model.R") m <- do.call(analyze_model,model_files("hls_k150_v100K...
# Clear workspace rm(list=ls()) # Set working directory setwd("C:/Users/Tom/Documents/Sta dat Tom/Thesis/R/") library(engsoccerdata) # (W)ML function - Bradley-Terry model LBT <- function(parameters, data, halfPeriod = Inf){ # All parameters should be strictly positive - enforced by exp # transformation parame...
/R code/Exploratory analysis/2PointsBT.R
no_license
ttvand/Master-thesis-Statistics-UEFA2016
R
false
false
1,747
r
# Clear workspace rm(list=ls()) # Set working directory setwd("C:/Users/Tom/Documents/Sta dat Tom/Thesis/R/") library(engsoccerdata) # (W)ML function - Bradley-Terry model LBT <- function(parameters, data, halfPeriod = Inf){ # All parameters should be strictly positive - enforced by exp # transformation parame...
#:# libraries library(digest) library(mlr) library(OpenML) library(farff) #:# config set.seed(1) #:# data dataset <- getOMLDataSet(data.name = "boston") head(dataset$data) #:# preprocessing head(dataset$data) #:# model task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass") lrn = makeLearne...
/models/openml_boston/classification_binaryClass/a028c0d610ce59028856d8f6debc7de2/code.R
no_license
pysiakk/CaseStudies2019S
R
false
false
683
r
#:# libraries library(digest) library(mlr) library(OpenML) library(farff) #:# config set.seed(1) #:# data dataset <- getOMLDataSet(data.name = "boston") head(dataset$data) #:# preprocessing head(dataset$data) #:# model task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass") lrn = makeLearne...
rm(list = ls()) # Bagging and Random Forests library(MASS) library(stargazer) stargazer(Boston) ??Boston set.seed(1) train = sample(1:nrow(Boston), nrow(Boston)/2) library(randomForest) ??randomForest set.seed(1) bag.boston=randomForest(medv~.,data=Boston,subset=train,mtry=13,import...
/Slides/Winter 2019/Bagging, Random Forests, and Boosting.R
permissive
anhnguyendepocen/ECO7100
R
false
false
1,522
r
rm(list = ls()) # Bagging and Random Forests library(MASS) library(stargazer) stargazer(Boston) ??Boston set.seed(1) train = sample(1:nrow(Boston), nrow(Boston)/2) library(randomForest) ??randomForest set.seed(1) bag.boston=randomForest(medv~.,data=Boston,subset=train,mtry=13,import...
library(shiny) library(shinyBS) library(plyr) library(xlsx) library(gdata) #library(XLConnect) library(tseries) library(DBI) library(RMySQL) library(stringr) library(forecast) library(xts) #source('vorskript.R') options(shiny.maxRequestSize=180*1024^2) options(encoding = 'UTF-8') options(java.parameters = "-Xms1g -X...
/server.R
no_license
mancap314/gaikan
R
false
false
9,612
r
library(shiny) library(shinyBS) library(plyr) library(xlsx) library(gdata) #library(XLConnect) library(tseries) library(DBI) library(RMySQL) library(stringr) library(forecast) library(xts) #source('vorskript.R') options(shiny.maxRequestSize=180*1024^2) options(encoding = 'UTF-8') options(java.parameters = "-Xms1g -X...
library(extremefit) ### Name: LoadCurve ### Title: Load curve of an habitation ### Aliases: LoadCurve ### ** Examples data("LoadCurve") X<-LoadCurve$data$Value days<-LoadCurve$data$Time Tgrid <- seq(min(days), max(days), length = 400) new.Tgrid <- LoadCurve$Tgrid ## Not run: ##D #For computing time purpose ##D #...
/data/genthat_extracted_code/extremefit/examples/LoadCurve.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,407
r
library(extremefit) ### Name: LoadCurve ### Title: Load curve of an habitation ### Aliases: LoadCurve ### ** Examples data("LoadCurve") X<-LoadCurve$data$Value days<-LoadCurve$data$Time Tgrid <- seq(min(days), max(days), length = 400) new.Tgrid <- LoadCurve$Tgrid ## Not run: ##D #For computing time purpose ##D #...
#' Draw an electoral map, with insets. #' #' @param .polygonal.data Data including the vertices of all polygons, including a \code{fill} variable to colour the polygons. #' @param year What elections' boundaries should be used? #' @param scale_fill_manual_args A list of arguments to pass to \code{scale_fill_manual}. #'...
/R/draw_electoral_divisions_map.R
permissive
HughParsonage/grattanElectionMaps
R
false
false
5,567
r
#' Draw an electoral map, with insets. #' #' @param .polygonal.data Data including the vertices of all polygons, including a \code{fill} variable to colour the polygons. #' @param year What elections' boundaries should be used? #' @param scale_fill_manual_args A list of arguments to pass to \code{scale_fill_manual}. #'...
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 8.29231817596776e-308, 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)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_row...
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613102108-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
343
r
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 8.29231817596776e-308, 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)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_row...
#!/usr/bin/env Rscript ## ## Copyright (C) 2016 Ezequiel Miron <eze.miron@bioch.ox.ac.uk> ## ## 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 3 of the License, or ## (at ...
/2chan/scripts/summary.R
no_license
ezemiron/Chain
R
false
false
3,535
r
#!/usr/bin/env Rscript ## ## Copyright (C) 2016 Ezequiel Miron <eze.miron@bioch.ox.ac.uk> ## ## 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 3 of the License, or ## (at ...
% Generated by roxygen2 (4.0.1): do not edit by hand \name{Eqplot} \alias{Eqplot} \title{Plot summary of the equilibrium simulation} \usage{ Eqplot(sim, fit, Blim, Bpa = 1.4 * Blim, ymax = c(NA, NA, NA), plot = TRUE, yield = "landings", extreme.trim) } \arguments{ \item{sim}{A list obtained from function \code{EqSim}...
/man/Eqplot.Rd
no_license
AndyCampbell/msy
R
false
false
912
rd
% Generated by roxygen2 (4.0.1): do not edit by hand \name{Eqplot} \alias{Eqplot} \title{Plot summary of the equilibrium simulation} \usage{ Eqplot(sim, fit, Blim, Bpa = 1.4 * Blim, ymax = c(NA, NA, NA), plot = TRUE, yield = "landings", extreme.trim) } \arguments{ \item{sim}{A list obtained from function \code{EqSim}...
library(ggplot2) library(scales) l <- read.csv('~/Dropbox/GenreProject/python/reception/poetry/overallpredictions.csv') l$birthdate[l$birthdate == 0] <- NA model = glm(data = l, formula = as.integer(reviewed == 'rev') ~ logistic + pubdate, family = binomial(logit)) intercept = coef(model)[1] / (-coef(model)[2]) slope =...
/oldplots/LogisticPoetryWCanon.R
permissive
bmschmidt/paceofchange
R
false
false
1,362
r
library(ggplot2) library(scales) l <- read.csv('~/Dropbox/GenreProject/python/reception/poetry/overallpredictions.csv') l$birthdate[l$birthdate == 0] <- NA model = glm(data = l, formula = as.integer(reviewed == 'rev') ~ logistic + pubdate, family = binomial(logit)) intercept = coef(model)[1] / (-coef(model)[2]) slope =...
## LOAD PACKAGES #### library(tidyverse) library(lubridate) library(ggmap) ## READ IN DATA #### data <- read_csv("data/traffic_counts_datasd.csv") ## SUMMARIZE DATA AND PULL GEOCODES #### year_limit_aggregate <- data %>% # Make column for year mutate(count_year = year(count_date)) %>% # Get total number of ca...
/2018-04-24_minihackathon/scripts/group_3_script.R
no_license
rladies/meetup-presentations_sandiego
R
false
false
2,183
r
## LOAD PACKAGES #### library(tidyverse) library(lubridate) library(ggmap) ## READ IN DATA #### data <- read_csv("data/traffic_counts_datasd.csv") ## SUMMARIZE DATA AND PULL GEOCODES #### year_limit_aggregate <- data %>% # Make column for year mutate(count_year = year(count_date)) %>% # Get total number of ca...
ls() remove(list = ls()) library(dplyr) library(PharmacoGx) phenoData <- readRDS("rds/phenoData_rat.rds") ################################################################################################################ ## (START) CREATING SENSITIVITY$INFO ## sensInfo <- subset(phenoData,select=c(UID,cell...
/Rat inVitro/sensitivityObject_rat_DNA_biorep.R
no_license
cjtangyx/ToxicoGx
R
false
false
10,099
r
ls() remove(list = ls()) library(dplyr) library(PharmacoGx) phenoData <- readRDS("rds/phenoData_rat.rds") ################################################################################################################ ## (START) CREATING SENSITIVITY$INFO ## sensInfo <- subset(phenoData,select=c(UID,cell...
% Generated by roxygen2 (4.0.1.99): do not edit by hand \name{getArgs} \alias{getArgs} \title{getArgs} \usage{ getArgs(verbose = FALSE, defaults = NULL, numeric = NULL) } \arguments{ \item{verbose}{print verbage to screen} \item{defaults}{a named list of defaults, optional} \item{numeric}{names of arguments that shou...
/man/getArgs.Rd
no_license
pyramidsnail/random-functions
R
false
false
779
rd
% Generated by roxygen2 (4.0.1.99): do not edit by hand \name{getArgs} \alias{getArgs} \title{getArgs} \usage{ getArgs(verbose = FALSE, defaults = NULL, numeric = NULL) } \arguments{ \item{verbose}{print verbage to screen} \item{defaults}{a named list of defaults, optional} \item{numeric}{names of arguments that shou...
# NESTED REFIT ---- #' Refits a Nested Modeltime Table #' #' @description #' Refits a Nested Modeltime Table to actual data using the following process: #' #' 1. Models are iteratively refit to .actual_data. #' 2. Any model that returns an error is logged. #' Errors can be retrieved with [extract_nested_error_report...
/R/nested-modeltime_refit.R
permissive
silverf62/modeltime
R
false
false
12,976
r
# NESTED REFIT ---- #' Refits a Nested Modeltime Table #' #' @description #' Refits a Nested Modeltime Table to actual data using the following process: #' #' 1. Models are iteratively refit to .actual_data. #' 2. Any model that returns an error is logged. #' Errors can be retrieved with [extract_nested_error_report...
library(dplyr) library(ggplot2) library(magrittr) DAD2Data <- read.csv("Data/DAD2Data.csv",stringsAsFactors=T) COMTData <- read.csv("Data/COMT_RS4680.csv",stringsAsFactors=F) BehaveData <- read.csv("Data/PING_Behavior.csv",stringsAsFactors=FALSE) Data <- GeneticData %>% left_join(BehaveData,by=c("SubjID")) %>% l...
/Messing:W:Data.R
no_license
Rob-StLouis/ping
R
false
false
2,460
r
library(dplyr) library(ggplot2) library(magrittr) DAD2Data <- read.csv("Data/DAD2Data.csv",stringsAsFactors=T) COMTData <- read.csv("Data/COMT_RS4680.csv",stringsAsFactors=F) BehaveData <- read.csv("Data/PING_Behavior.csv",stringsAsFactors=FALSE) Data <- GeneticData %>% left_join(BehaveData,by=c("SubjID")) %>% l...
setwd("~/LA Process and Theory (HUDK 4051)/Loop Closing/loop-closing") library(rmarkdown) rmarkdown::render("Lizarov,Anna.Tweet_Visualization_Report.Rmd") library(sendmailR) #Email sendmail_options(smtpServer="ASPMX.L.GOOGLE.COM") address <- as.character("annalizarov@gmail.com") address <- paste("<", address, ">", ...
/Script.R
no_license
lizarova777/Closing_the_Loop_Project
R
false
false
496
r
setwd("~/LA Process and Theory (HUDK 4051)/Loop Closing/loop-closing") library(rmarkdown) rmarkdown::render("Lizarov,Anna.Tweet_Visualization_Report.Rmd") library(sendmailR) #Email sendmail_options(smtpServer="ASPMX.L.GOOGLE.COM") address <- as.character("annalizarov@gmail.com") address <- paste("<", address, ">", ...
numPerPatch60140 <- c(2473,2527)
/NatureEE-data-archive/Run203021/JAFSdata/JAFSnumPerPatch60140.R
no_license
flaxmans/NatureEE2017
R
false
false
33
r
numPerPatch60140 <- c(2473,2527)
"ordiParseFormula" <- function (formula, data, xlev = NULL, envdepth = 2, na.action = na.fail, subset = NULL) { if (missing(data)) data <- environment(formula) Terms <- terms(formula, "Condition", data = data) flapart <- fla <- formula <- formula(Terms, width.cutoff = 500) specdata <-...
/R/ordiParseFormula.R
no_license
vanderleidebastiani/vegan
R
false
false
3,902
r
"ordiParseFormula" <- function (formula, data, xlev = NULL, envdepth = 2, na.action = na.fail, subset = NULL) { if (missing(data)) data <- environment(formula) Terms <- terms(formula, "Condition", data = data) flapart <- fla <- formula <- formula(Terms, width.cutoff = 500) specdata <-...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/H_time_series.R \name{HTS.exponential.smoothing} \alias{HTS.exponential.smoothing} \title{Smoothing with exponential smoothing of a histogram time series} \usage{ HTS.exponential.smoothing(HTS, alpha = 0.9) } \arguments{ \item{HTS}{A \code{HT...
/man/HTS.exponential.smoothing.Rd
no_license
Airpino/HistDAWass
R
false
true
943
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/H_time_series.R \name{HTS.exponential.smoothing} \alias{HTS.exponential.smoothing} \title{Smoothing with exponential smoothing of a histogram time series} \usage{ HTS.exponential.smoothing(HTS, alpha = 0.9) } \arguments{ \item{HTS}{A \code{HT...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sample_mean.R \name{sample_mean} \alias{sample_mean} \title{take as input a vector vec and an integer n. It should take a random sample of size n from vec, then calculate and return the mean of that subsample.} \usage{ sample_mean(vec, n) } \...
/man/sample_mean.Rd
permissive
elainesabine/stats331lab7
R
false
true
578
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sample_mean.R \name{sample_mean} \alias{sample_mean} \title{take as input a vector vec and an integer n. It should take a random sample of size n from vec, then calculate and return the mean of that subsample.} \usage{ sample_mean(vec, n) } \...
vars.tmp <- commandArgs() vars <- vars.tmp[length(vars.tmp)] split.vars <- unlist(strsplit(vars, ",")) Sample_Name <- split.vars [1] Output_Folder <- split.vars[2] Program_Folder <- split.vars[3] chr <- split.vars[4] target.name <- split.vars[5] FileBAMIn <- split.vars[6] DepthString<-"samtools bedcov " FileBEDIn<-fi...
/lib/R/MakeDOC.R
no_license
yanlinlin82/XCAVATOR
R
false
false
719
r
vars.tmp <- commandArgs() vars <- vars.tmp[length(vars.tmp)] split.vars <- unlist(strsplit(vars, ",")) Sample_Name <- split.vars [1] Output_Folder <- split.vars[2] Program_Folder <- split.vars[3] chr <- split.vars[4] target.name <- split.vars[5] FileBAMIn <- split.vars[6] DepthString<-"samtools bedcov " FileBEDIn<-fi...
library(datasets) data() data(iris) ?iris subset(iris,Species=="virginica") mean(subset(iris,Species=="virginica")[, "Sepal.Length"]) # can use tapply as well tapply(iris$Sepal.Length, iris$Species, mean) apply(iris[, 1:4], 2, mean) data(mtcars) ?mtcars mtcars mean(subset(mtcars,cyl==4)[, "mpg"]) tapply(mtcar...
/Quiz3.R
no_license
shahnish/R_Programming
R
false
false
452
r
library(datasets) data() data(iris) ?iris subset(iris,Species=="virginica") mean(subset(iris,Species=="virginica")[, "Sepal.Length"]) # can use tapply as well tapply(iris$Sepal.Length, iris$Species, mean) apply(iris[, 1:4], 2, mean) data(mtcars) ?mtcars mtcars mean(subset(mtcars,cyl==4)[, "mpg"]) tapply(mtcar...
#' dcemriboost - Boosting for DCE-MRI data. #' #' With dcemriboost voxelwise and spatially regularized boosting for DCE-MRI data can be performed. #' #' Implemented methods are #' #' boostvw: voxelwise boosting #' #' spatboost: spatially regularized boosting #' #' refit: Refit for voxelwise and spatially regularize...
/R/dcemriboost-package.r
no_license
bioimaginggroup/dcemriboost
R
false
false
601
r
#' dcemriboost - Boosting for DCE-MRI data. #' #' With dcemriboost voxelwise and spatially regularized boosting for DCE-MRI data can be performed. #' #' Implemented methods are #' #' boostvw: voxelwise boosting #' #' spatboost: spatially regularized boosting #' #' refit: Refit for voxelwise and spatially regularize...
% Generated by roxygen2 (4.0.0): do not edit by hand \name{PlotNetworkHeatmap} \alias{PlotNetworkHeatmap} \title{Plot network edge weights as a heatmap.} \usage{ PlotNetworkHeatmap(edge.matrix, network.labels = NULL, xlab = "", ylab = "", node.labels = NULL, legend.main = "", cluster.legend.main = "", legend.bins =...
/man/PlotNetworkHeatmap.Rd
no_license
sritchie73/networkTools
R
false
false
2,149
rd
% Generated by roxygen2 (4.0.0): do not edit by hand \name{PlotNetworkHeatmap} \alias{PlotNetworkHeatmap} \title{Plot network edge weights as a heatmap.} \usage{ PlotNetworkHeatmap(edge.matrix, network.labels = NULL, xlab = "", ylab = "", node.labels = NULL, legend.main = "", cluster.legend.main = "", legend.bins =...
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) shinyUI(navbarPage( "BibeR", tabPanel("Home", includeHTML("user guide.html")), tabPanel( "Load file", sidebarLayout( si...
/ui.R
permissive
wangjs/BibeR
R
false
false
31,232
r
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) shinyUI(navbarPage( "BibeR", tabPanel("Home", includeHTML("user guide.html")), tabPanel( "Load file", sidebarLayout( si...
#install.packages('nycvoos13') #install.packages('tidyverse') library(nycvoos13) library(tidyverse) dim(voos) voos = voos #tibble vs data.frame voos df_voos = as.data.frame(voos) # Pick observations by their values (filter()). # Reorder the rows (arrange()). # Pick variables by their names (select()). # Create new ...
/tutorials/code/2019-03-21_dplyr_tutorial.R
no_license
gruposisda/fa084-2019-1S
R
false
false
2,978
r
#install.packages('nycvoos13') #install.packages('tidyverse') library(nycvoos13) library(tidyverse) dim(voos) voos = voos #tibble vs data.frame voos df_voos = as.data.frame(voos) # Pick observations by their values (filter()). # Reorder the rows (arrange()). # Pick variables by their names (select()). # Create new ...
# install.packages("SingleCellExperiment_1.0.0.tar.gz", repos = NULL, type="source") # install.packages("LineagePulse_0.99.19.tar.gz", repos = NULL, type="source") library(LineagePulse) # ========== Read data ========== normalizedCounts <- as.matrix(read.table("data/normalisedCountsVariableGenes.txt", header=TRUE, s...
/LineagePulse.R
no_license
boyinggong/245DFinalProject
R
false
false
1,235
r
# install.packages("SingleCellExperiment_1.0.0.tar.gz", repos = NULL, type="source") # install.packages("LineagePulse_0.99.19.tar.gz", repos = NULL, type="source") library(LineagePulse) # ========== Read data ========== normalizedCounts <- as.matrix(read.table("data/normalisedCountsVariableGenes.txt", header=TRUE, s...
testthat::context("makeWeightsDT") testthat::test_that("makeWeightsDT works with various weights & adjust spesifications", { popEpi:::skip_normally() sibr <- popEpi::sibr[1:100] sibr[1:50, sex := 0L] dt <- lexpand(sibr, birth = bi_date, entry = dg_date, exit = ex_date, status = sta...
/tests/testthat/test_weighter.R
no_license
cran/popEpi
R
false
false
5,253
r
testthat::context("makeWeightsDT") testthat::test_that("makeWeightsDT works with various weights & adjust spesifications", { popEpi:::skip_normally() sibr <- popEpi::sibr[1:100] sibr[1:50, sex := 0L] dt <- lexpand(sibr, birth = bi_date, entry = dg_date, exit = ex_date, status = sta...
#clean data t<-read.table(file = "household_power_consumption.txt",header = TRUE, sep = ";", na.strings = "?" ) t$Date<-as.Date(t[,1], format = "%d/%m/%Y") t<-subset(t, t[,1]>=as.Date("2007-02-01") & t[,1]<=as.Date("2007-02-02") ) colnames(t)<- c("Date","Time","Global Active Power", "Global Reactive Power","Voltage", ...
/hw1_explo.R
no_license
p021122/datasciencecoursera
R
false
false
2,191
r
#clean data t<-read.table(file = "household_power_consumption.txt",header = TRUE, sep = ";", na.strings = "?" ) t$Date<-as.Date(t[,1], format = "%d/%m/%Y") t<-subset(t, t[,1]>=as.Date("2007-02-01") & t[,1]<=as.Date("2007-02-02") ) colnames(t)<- c("Date","Time","Global Active Power", "Global Reactive Power","Voltage", ...
library(HardyWeinberg) ### Name: HardyWeinberg-package ### Title: Statistical Tests and Graphics for Hardy-Weinberg Equilibrium ### Aliases: HardyWeinberg-package HardyWeinberg ### Keywords: package ### ** Examples library(HardyWeinberg) # draw random SNPs from a population that is in HWE set.seed(123) m <- 100...
/data/genthat_extracted_code/HardyWeinberg/examples/HardyWeinberg-package.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
454
r
library(HardyWeinberg) ### Name: HardyWeinberg-package ### Title: Statistical Tests and Graphics for Hardy-Weinberg Equilibrium ### Aliases: HardyWeinberg-package HardyWeinberg ### Keywords: package ### ** Examples library(HardyWeinberg) # draw random SNPs from a population that is in HWE set.seed(123) m <- 100...
library("shape") library("metacell") scdb_init("scrna_db/", force_reinit=T) scfigs_init("figs") tgconfig::override_params("config/sing_emb.yaml","metacell") source("scripts/generate_paper_figures/plot_vein.r") gen_fig_4_plots = function() { if(!dir.exists("figs/paper_figs/fig4")) { dir.create("figs/paper_fig...
/scripts/generate_paper_figures/fig_4.r
no_license
tanaylab/embflow
R
false
false
18,862
r
library("shape") library("metacell") scdb_init("scrna_db/", force_reinit=T) scfigs_init("figs") tgconfig::override_params("config/sing_emb.yaml","metacell") source("scripts/generate_paper_figures/plot_vein.r") gen_fig_4_plots = function() { if(!dir.exists("figs/paper_figs/fig4")) { dir.create("figs/paper_fig...
#' Run parallel MCMC sampling using JAGS. #' #' #' @aliases run_jags #' @keywords internal #' @inheritParams mcp #' @inheritParams rjags::jags.model #' @inheritParams rjags::coda.samples #' @param jags_code A string. JAGS model, usually returned by `make_jagscode()`. #' @param pars Character vector of parameters to sav...
/R/run_jags.R
no_license
jpzhangvincent/mcp
R
false
false
6,432
r
#' Run parallel MCMC sampling using JAGS. #' #' #' @aliases run_jags #' @keywords internal #' @inheritParams mcp #' @inheritParams rjags::jags.model #' @inheritParams rjags::coda.samples #' @param jags_code A string. JAGS model, usually returned by `make_jagscode()`. #' @param pars Character vector of parameters to sav...
library(annotate) ### Name: PWAmat ### Title: A function to compute the probe to KEGG pathway incidence ### matrix. ### Aliases: PWAmat ### Keywords: manip ### ** Examples library("hgu95av2.db") Am1 <- PWAmat("hgu95av2")
/data/genthat_extracted_code/annotate/examples/PWAmat.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
234
r
library(annotate) ### Name: PWAmat ### Title: A function to compute the probe to KEGG pathway incidence ### matrix. ### Aliases: PWAmat ### Keywords: manip ### ** Examples library("hgu95av2.db") Am1 <- PWAmat("hgu95av2")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/kissmigAccess.R \name{kissmigAccess} \alias{kissmigAccess} \title{Get accessiblity map from kissmig output} \usage{ kissmigAccess(grd, rel=FALSE) } \arguments{ \item{grd}{a single RasterLayer of first occurrence generated by kissmig}...
/man/kissmigAccess.Rd
no_license
cran/kissmig
R
false
true
1,251
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/kissmigAccess.R \name{kissmigAccess} \alias{kissmigAccess} \title{Get accessiblity map from kissmig output} \usage{ kissmigAccess(grd, rel=FALSE) } \arguments{ \item{grd}{a single RasterLayer of first occurrence generated by kissmig}...
\name{mineralRef} \alias{mineralRef} \title{Reference spectra for clay minerals and iron oxides} \usage{ data('mineralRef') } \description{ Specific mineral compounds measured by laboratory spectrometers, from Kokaly et al., (2017). A data frame with 2151 rows and 13 columns: \itemize{ \item{\bold{wavelength}...
/man/mineralRef.Rd
permissive
AlexandreWadoux/soilspec
R
false
false
1,965
rd
\name{mineralRef} \alias{mineralRef} \title{Reference spectra for clay minerals and iron oxides} \usage{ data('mineralRef') } \description{ Specific mineral compounds measured by laboratory spectrometers, from Kokaly et al., (2017). A data frame with 2151 rows and 13 columns: \itemize{ \item{\bold{wavelength}...
shinyUI(pageWithSidebar( headerPanel("RTilary\n Try to hit a mark at 1000ft."), sidebarPanel( sliderInput('theta', 'At what angle in degrees whould you like to fire?', value=45, min=0, max=180, step=1) , sliderInput('v','At what velocity (ft/sec) would you like to fire?', value=50,min=0,max=1000,step=1) ,...
/ui.R
no_license
kanders03/RTilary
R
false
false
421
r
shinyUI(pageWithSidebar( headerPanel("RTilary\n Try to hit a mark at 1000ft."), sidebarPanel( sliderInput('theta', 'At what angle in degrees whould you like to fire?', value=45, min=0, max=180, step=1) , sliderInput('v','At what velocity (ft/sec) would you like to fire?', value=50,min=0,max=1000,step=1) ,...
#code for reading the file data<-read.table("household_power_consumption.txt",header=TRUE,sep=";",na.strings="?") #Date conversion data$Date<-as.Date(data$Date,format="%d/%m/%Y") #data$Time<-strptime(data$Time,format="%H:%M:%S") #Subsetting the data frame data1<-subset(data,Date=="2007-02-01" | Date=="2007-02-02") ...
/plot1.R
no_license
sheetal-kon/ExData_Plotting1
R
false
false
529
r
#code for reading the file data<-read.table("household_power_consumption.txt",header=TRUE,sep=";",na.strings="?") #Date conversion data$Date<-as.Date(data$Date,format="%d/%m/%Y") #data$Time<-strptime(data$Time,format="%H:%M:%S") #Subsetting the data frame data1<-subset(data,Date=="2007-02-01" | Date=="2007-02-02") ...
plot.nnet<-function(mod.in,nid=T,all.out=T,all.in=T,bias=T,wts.only=F,rel.rsc=5, circle.cex=5,node.labs=T,var.labs=T,x.lab=NULL,y.lab=NULL, line.stag=NULL,struct=NULL,cex.val=1,alpha.val=1, circle.col='lightblue',pos.col='black',neg.col='grey', ...
/src/nnet_plot.R
no_license
jaindeepali/numerai
R
false
false
13,207
r
plot.nnet<-function(mod.in,nid=T,all.out=T,all.in=T,bias=T,wts.only=F,rel.rsc=5, circle.cex=5,node.labs=T,var.labs=T,x.lab=NULL,y.lab=NULL, line.stag=NULL,struct=NULL,cex.val=1,alpha.val=1, circle.col='lightblue',pos.col='black',neg.col='grey', ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compose_estimators.R \name{make_estimator} \alias{make_estimator} \title{Creates an estimator} \usage{ make_estimator(as, bs, post = ratio, collector = collect2_sum) } \arguments{ \item{as}{a \code{list} of a functions} \item{bs}{a \code{lis...
/man/make_estimator.Rd
no_license
novisci/monoidimator
R
false
true
597
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compose_estimators.R \name{make_estimator} \alias{make_estimator} \title{Creates an estimator} \usage{ make_estimator(as, bs, post = ratio, collector = collect2_sum) } \arguments{ \item{as}{a \code{list} of a functions} \item{bs}{a \code{lis...
context("rgee: ee_install test") # Pre-checking ------------------------------------------------------ # Google credentials were loaded in the system? skip_if_no_credentials <- function(user) { ee_path <- path.expand(sprintf("~/.config/earthengine/%s", user)) credentials <- list.files( path = ee_path, patt...
/tests/testthat/test-install.R
permissive
dondealban/rgee
R
false
false
1,749
r
context("rgee: ee_install test") # Pre-checking ------------------------------------------------------ # Google credentials were loaded in the system? skip_if_no_credentials <- function(user) { ee_path <- path.expand(sprintf("~/.config/earthengine/%s", user)) credentials <- list.files( path = ee_path, patt...
#' Create a Hierarchical Dirichlet Mixture of #' semi-conjugate Multivariate Normal Distributions #' #' @param dataList List of data for each separate Dirichlet mixture object #' @param g0Priors Prior Parameters for the top level base distribution. #' @param gammaPriors Prior parameters for the top level concentration ...
/R/dirichlet_process_hierarchical_mvnormal2.R
no_license
cran/dirichletprocess
R
false
false
2,418
r
#' Create a Hierarchical Dirichlet Mixture of #' semi-conjugate Multivariate Normal Distributions #' #' @param dataList List of data for each separate Dirichlet mixture object #' @param g0Priors Prior Parameters for the top level base distribution. #' @param gammaPriors Prior parameters for the top level concentration ...
orcid.id <- "0000-0002-9583-8636" d <- works(orcid_id(orcid = orcid.id)) dois <- identifiers(d, type = "doi") dois <- dois[duplicated(tolower(dois))==FALSE] # remove duplicates apa_papers <- cr_cn(dois, format = "text" , "apa")
/apa-format-papers.R
no_license
awconway/cv
R
false
false
234
r
orcid.id <- "0000-0002-9583-8636" d <- works(orcid_id(orcid = orcid.id)) dois <- identifiers(d, type = "doi") dois <- dois[duplicated(tolower(dois))==FALSE] # remove duplicates apa_papers <- cr_cn(dois, format = "text" , "apa")
setwd("~/XXX") library( DESeq2 ) rpf_deg<-read.table("xx.txt", fill=T,header=T, sep="\t") head(RPF) mrna_deg<-read.table("yy.txt", fill=T,header=T, sep="\t") head(MRNA) RPF_MRNA<-merge(rpf_deg, mrna_deg, by.x="idR", by.y="idM", all=T) write.table(RPF_MRNA, "xyxy.csv",sep=",", col.names=NA, row.names=T ) data.df<-read.t...
/R_scripts/RPF_juli.R
no_license
tsekara/TransRefiner
R
false
false
3,181
r
setwd("~/XXX") library( DESeq2 ) rpf_deg<-read.table("xx.txt", fill=T,header=T, sep="\t") head(RPF) mrna_deg<-read.table("yy.txt", fill=T,header=T, sep="\t") head(MRNA) RPF_MRNA<-merge(rpf_deg, mrna_deg, by.x="idR", by.y="idM", all=T) write.table(RPF_MRNA, "xyxy.csv",sep=",", col.names=NA, row.names=T ) data.df<-read.t...
# CPUE_analysis_2012 # SDH starting 2012-06-10 # 1. Extract data using 2012_data_prep.r # 2. A bit of pre-processing using intro_processing_pl.r # 2b. Bit more cleaning # 3. Split up by region # 4. Cluster a region by trip using kmeans # 5. Link each set with a cluster # 6. Plot the sets on a map, coloured by cluster #...
/ALB_CPUE_analysis_2012.r
permissive
hoyles/R4CPUE
R
false
false
30,567
r
# CPUE_analysis_2012 # SDH starting 2012-06-10 # 1. Extract data using 2012_data_prep.r # 2. A bit of pre-processing using intro_processing_pl.r # 2b. Bit more cleaning # 3. Split up by region # 4. Cluster a region by trip using kmeans # 5. Link each set with a cluster # 6. Plot the sets on a map, coloured by cluster #...
# Install car package install.packages(c("car", "gvlma", "MASS", "leaps")) library(car) # Import liberty data libertyRegressionData <- read.csv("/Users/janardhanbonu/OneDrive/MUM/datamining/LibertyRegressionData.csv") names(libertyRegressionData) # Scatter plot scatterplotMatrix(libertyRegressionData, spread=FALSE, ...
/libertystore/LibertyRegression.R
no_license
Bonu/dataminingusingr
R
false
false
945
r
# Install car package install.packages(c("car", "gvlma", "MASS", "leaps")) library(car) # Import liberty data libertyRegressionData <- read.csv("/Users/janardhanbonu/OneDrive/MUM/datamining/LibertyRegressionData.csv") names(libertyRegressionData) # Scatter plot scatterplotMatrix(libertyRegressionData, spread=FALSE, ...
\name{ridge} \title{Ridge regression} \usage{ } \arguments{ } \details{ } \value{ } \references{ } \author{Gad Abraham\cr Maintainer: Gad Abraham \email{gad.abraham@unimelb.edu.au}} \examples{ }
/FMPR/man/ridge.Rd
permissive
gabraham/FMPR
R
false
false
204
rd
\name{ridge} \title{Ridge regression} \usage{ } \arguments{ } \details{ } \value{ } \references{ } \author{Gad Abraham\cr Maintainer: Gad Abraham \email{gad.abraham@unimelb.edu.au}} \examples{ }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/callECNV.R \name{callExonCNV} \alias{callExonCNV} \title{Call exon CNVs.} \usage{ callExonCNV(probFile, mergedCovFile, path = NULL, sample.id = NULL, cutoff = list(prob = 1e-04, pool.count = 1, baseline = 50, lowdepth = 10)) } \arguments{...
/man/callExonCNV.Rd
no_license
wangpanqiao/exonCNV
R
false
true
858
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/callECNV.R \name{callExonCNV} \alias{callExonCNV} \title{Call exon CNVs.} \usage{ callExonCNV(probFile, mergedCovFile, path = NULL, sample.id = NULL, cutoff = list(prob = 1e-04, pool.count = 1, baseline = 50, lowdepth = 10)) } \arguments{...
myFunction <- function() { x <- rnorm(100) mean(x) }
/R_Programming/RandomNum.R
no_license
spurekar/DataScienceCoursera
R
false
false
54
r
myFunction <- function() { x <- rnorm(100) mean(x) }
kripp.boot <- function(x, raters='rows', probs=c(.025,.975), iter=100, method='nominal') { if (!is.numeric(as.matrix(x))) stop(x, ' contains non-numeric cells') alphas <- numeric(iter) if (raters == 'cols') x <- t(x) for (i in 1:iter) { alphas[i] <- kripp.alpha(x[,sample(nco...
/R/kripp.boot.R
permissive
aderivaldocabral/kripp.boot
R
false
false
961
r
kripp.boot <- function(x, raters='rows', probs=c(.025,.975), iter=100, method='nominal') { if (!is.numeric(as.matrix(x))) stop(x, ' contains non-numeric cells') alphas <- numeric(iter) if (raters == 'cols') x <- t(x) for (i in 1:iter) { alphas[i] <- kripp.alpha(x[,sample(nco...
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/1609874225-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,...
options(warn=-1) packs2install<-c() if(!require("CompQuadForm")){ packs2install<-c(packs2install,"CompQuadForm") } if(!require("corpcor")){ packs2install<-c(packs2install,"corpcor") } if(!require("data.table")){ packs2install<-c(packs2install,"data.table") } if(!require("optparse")){ packs2install<-c(packs2...
/Rscripts/checkpackages.R
no_license
marxp/PEGASUS
R
false
false
408
r
options(warn=-1) packs2install<-c() if(!require("CompQuadForm")){ packs2install<-c(packs2install,"CompQuadForm") } if(!require("corpcor")){ packs2install<-c(packs2install,"corpcor") } if(!require("data.table")){ packs2install<-c(packs2install,"data.table") } if(!require("optparse")){ packs2install<-c(packs2...
library(tidyverse) library(magrittr) print("Loading the data") ##### PHASE UNO - Load the data # Get genomewide counts inputDir <- "/net/snowwhite/home/beckandy/research/smaug-redux/motif_counts/9-mers/full/" gwCount <- read_tsv(paste0(inputDir, "chr", 1, ".9-mer_motifs_full.txt"), col_name= T, col_types = cols( ...
/src/global_train_data.r
no_license
theandyb/singleton_case_control
R
false
false
3,812
r
library(tidyverse) library(magrittr) print("Loading the data") ##### PHASE UNO - Load the data # Get genomewide counts inputDir <- "/net/snowwhite/home/beckandy/research/smaug-redux/motif_counts/9-mers/full/" gwCount <- read_tsv(paste0(inputDir, "chr", 1, ".9-mer_motifs_full.txt"), col_name= T, col_types = cols( ...
#Use of Survey Solutions API system #Brian Stacy 6/11/2019 library(httr) library(haven) library(tidyverse) library(here) library(digest) library(sdcMicro) ################## # Load the data ################## load(file = file.path(confidential_folder, "public_officials_indicators_data.RData")) #generate list of da...
/Countries/Pakistan/2022/KP/Public_Officials/01_data/04_public_officials_anonymizer.R
permissive
worldbank/GEPD
R
false
false
7,632
r
#Use of Survey Solutions API system #Brian Stacy 6/11/2019 library(httr) library(haven) library(tidyverse) library(here) library(digest) library(sdcMicro) ################## # Load the data ################## load(file = file.path(confidential_folder, "public_officials_indicators_data.RData")) #generate list of da...
library(dplyr) library(data.table) library(fastDummies) # read in datatables library_checkouts <- fread('Checkouts_By_Title_Data_Lens_2017.csv') dictionary <- fread('Integrated_Library_System__ILS__Data_Dictionary.csv') # create final dataset final_df <- library_checkouts[, c('BibNumber', 'ItemType', 'Collec...
/library-checkouts/prepare & clean.R
no_license
ewoudb33/portfolio-code
R
false
false
3,803
r
library(dplyr) library(data.table) library(fastDummies) # read in datatables library_checkouts <- fread('Checkouts_By_Title_Data_Lens_2017.csv') dictionary <- fread('Integrated_Library_System__ILS__Data_Dictionary.csv') # create final dataset final_df <- library_checkouts[, c('BibNumber', 'ItemType', 'Collec...
args = commandArgs(TRUE) i = as.integer(args[1]) mse = function(x, y) mean((x - y)^2) source("../../src/cluster_seq_mix.R") get.max=function(x) which(x==max(x)) normalize=function(x){ #if(sum(abs(x))!=0){ return(x/sum(x)) #}else{ # return(rep(0,length(x))) #} } #generate data K=4 n=20 B=1024 lambda.tr...
/results/simulations/run_simple_simulation.R
no_license
zrxing/sequence_clustering
R
false
false
1,248
r
args = commandArgs(TRUE) i = as.integer(args[1]) mse = function(x, y) mean((x - y)^2) source("../../src/cluster_seq_mix.R") get.max=function(x) which(x==max(x)) normalize=function(x){ #if(sum(abs(x))!=0){ return(x/sum(x)) #}else{ # return(rep(0,length(x))) #} } #generate data K=4 n=20 B=1024 lambda.tr...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/btprob.R \name{btprob} \alias{btprob} \title{Calculates Bradley-Terry probabilities} \usage{ btprob(object, subset = NULL, as_df = FALSE) } \arguments{ \item{object}{An object of class "btfit", typically the result \code{ob} of \code{ob <- bt...
/man/btprob.Rd
no_license
cran/BradleyTerryScalable
R
false
true
4,285
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/btprob.R \name{btprob} \alias{btprob} \title{Calculates Bradley-Terry probabilities} \usage{ btprob(object, subset = NULL, as_df = FALSE) } \arguments{ \item{object}{An object of class "btfit", typically the result \code{ob} of \code{ob <- bt...
#' Get descriptions of kcd codes #' #' you can get kcd and find its description in the kcd book. #' @param string A kcd code or regular expression #' @examples #' get_kcd('J00') #' get_kcd('^M51$') get_kcd <- function (kcd, lang = "kr") { if (missing(kcd)) stop('Please insert kcd code string or regular expression...
/R/get_kcd.R
no_license
seokhoonj/underwriter
R
false
false
3,656
r
#' Get descriptions of kcd codes #' #' you can get kcd and find its description in the kcd book. #' @param string A kcd code or regular expression #' @examples #' get_kcd('J00') #' get_kcd('^M51$') get_kcd <- function (kcd, lang = "kr") { if (missing(kcd)) stop('Please insert kcd code string or regular expression...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/select.c.prior.R \name{select.c.prior} \alias{select.c.prior} \title{Select the c prior for the Three-Parameter Normal Ogive Model} \usage{ select.c.prior(nitem, m = 20, ...) } \arguments{ \item{nitem}{Number of alternatives for each item.} ...
/man/select.c.prior.Rd
no_license
cran/bairt
R
false
true
1,642
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/select.c.prior.R \name{select.c.prior} \alias{select.c.prior} \title{Select the c prior for the Three-Parameter Normal Ogive Model} \usage{ select.c.prior(nitem, m = 20, ...) } \arguments{ \item{nitem}{Number of alternatives for each item.} ...
require(shiny) require(Seurat) require(dplyr) require(Matrix) require(plotly) require(DT) require(shinydashboard) dashboardPage(title = 'sciViz', dashboardHeader(title = "SciViz"), dashboardSidebar( sidebarMenu( menuItem("Import Data", tabName = "dataUpload", icon = icon("cloud-upload")), ...
/ui.R
no_license
gnetsanet/scViz
R
false
false
2,188
r
require(shiny) require(Seurat) require(dplyr) require(Matrix) require(plotly) require(DT) require(shinydashboard) dashboardPage(title = 'sciViz', dashboardHeader(title = "SciViz"), dashboardSidebar( sidebarMenu( menuItem("Import Data", tabName = "dataUpload", icon = icon("cloud-upload")), ...
shinyServer(function(input, output,session){ ## Overview Page output$overview_rev <- renderPlotly({ plot_ly(cat_overview, labels = ~binary_state, values = ~count, type = 'pie') %>% layout(title = '', xaxis = list(showgrid = TRUE, zeroline = FALSE, showticklabels =...
/server.R
no_license
csongdechakraiwut/R_Shiny_Visualization
R
false
false
5,043
r
shinyServer(function(input, output,session){ ## Overview Page output$overview_rev <- renderPlotly({ plot_ly(cat_overview, labels = ~binary_state, values = ~count, type = 'pie') %>% layout(title = '', xaxis = list(showgrid = TRUE, zeroline = FALSE, showticklabels =...
library(xlsx) library(ggplot2) library(Hmisc) library(MASS) #lda library(tm) # KNN ####################################### DATA PREPARATION ############################################### lanco <- read.xlsx("/Users/Caner/Desktop/SMU_Class/Statistics_5520/Case5_Lanco/Lanco5.xlsx", sheetIndex = 1) lanco <- lanco[c(1:75...
/Case5_Lanco/Lanco.R
no_license
CanerIrfanoglu/A00425840_MCDA5520
R
false
false
6,479
r
library(xlsx) library(ggplot2) library(Hmisc) library(MASS) #lda library(tm) # KNN ####################################### DATA PREPARATION ############################################### lanco <- read.xlsx("/Users/Caner/Desktop/SMU_Class/Statistics_5520/Case5_Lanco/Lanco5.xlsx", sheetIndex = 1) lanco <- lanco[c(1:75...
library(shiny) shinyServer(function(input, output) { # Always include the point (0,0) data <- reactiveValues(x=NULL,y=NULL,k=NULL) observeEvent(input$clear, { #Clear Points data$x <- NULL data$y <- NULL }) observeEvent(input$plot_click, { # Add Clicked ...
/Data Products/Shiny App/app/server.R
no_license
rsizem2/jhu-data-science
R
false
false
2,012
r
library(shiny) shinyServer(function(input, output) { # Always include the point (0,0) data <- reactiveValues(x=NULL,y=NULL,k=NULL) observeEvent(input$clear, { #Clear Points data$x <- NULL data$y <- NULL }) observeEvent(input$plot_click, { # Add Clicked ...
#file.choose() abre uma caixa de diálogo para você selecionar o arquivo; pode também #colocar o caminho completo do arquivo se for mexer só com um específico #header = TRUE ; se existir nomes de coluna, estes serão importados para o data frame #sep é o separador que vai definir a separação dos dados no data frame x = ...
/importando_dados.R
no_license
laaragm/Fundamentos_R
R
false
false
1,001
r
#file.choose() abre uma caixa de diálogo para você selecionar o arquivo; pode também #colocar o caminho completo do arquivo se for mexer só com um específico #header = TRUE ; se existir nomes de coluna, estes serão importados para o data frame #sep é o separador que vai definir a separação dos dados no data frame x = ...
context("UNFv6: AsIs") test_that("AsIs vectors converted to character", { expect_true(as.unfvector(I(1)) == "1") expect_true(identical(unf(I(1))$unf, unf("1")$unf)) })
/tests/testthat/test-unf6-asis.R
no_license
leeper/UNF
R
false
false
177
r
context("UNFv6: AsIs") test_that("AsIs vectors converted to character", { expect_true(as.unfvector(I(1)) == "1") expect_true(identical(unf(I(1))$unf, unf("1")$unf)) })