I am trying to make a vectorized function using ifelse in R, but my code is only taking the first element of the vector. For example, as shown in my code below
The R package MatchIT uses a caliper width on the standard deviation of the propensity score. Is there a way to use logit of the propensity score?
I was running this code on RStudio param <- list(colsample_bytree = 1, subsample = .6, booster = "gbtree", max_dept
I have a code that counts how many points there are for each quadrant of 10x10 and shows the result in each quadrant I have this Dataframe qx qy n
I am trying to add a math symbol (sum) to some texts in x-axis. For example, if this is my plot. data(iris) p1 <- ggplot(iris, aes(x=Species, y=Sepal.Length)
Given a list that contains N strings of lowercase English alphabets. Any number of contiguous strings can be found together to form a new string. The grouping f
I have a data frame containing only one row with named columns. The data frame looks somewhat like this: poms_tat1 poms_tat2 poms_tat3 tens1 tens2
I have a k*k squared matrix with diagonal elements x>0 and all other elements y>0. The values of k, x, y are all subject to change. Now I need the determi
I am trying to save a list of patchworked ggplots (ie ggplots that have been wrapped together into 1 plot using the package patchwork). My real data is creating
I've been having problems on knitting Rmarkdown, and it's been frustrating that I have no idea what to do. Every time I knit them, it always ended up with an er
This command: installed.packages(c("ggplot2","swirl","lattice","car","fimport","tseries")) generates the error "Package LibPath Version Priority Depends Im
In my R script for MS SQL Server I try to return one column VARBINARY() and one VARCHAR(). However, server allow only one column when VARBINARY is returned: T
I want the vertical lines to not go beyond the curve line after they intersect Example data: x <- 1:50 dat <- data.frame(x = x, y = 1 - exp(-x/43)^4) ggp
I'm struggling to figure how to change my x-axis label in ggplot2 from regular identifications to not-so-regular plus/minus signs to relate the addition or abse
See example: shinyFunction <- function(){ shinyApp( ui = basicPage( actionButton('print_message', "Print a message") ), server = fun
Let's say I have the following dataset: dat <- read.table(text="id_1 id_2 123 NA 456 NA NA 3
I was trying to do a QCA analysis of sufficeny in RStudio 4.1.3. using truthTable command. By running the code i get Error: wrong outcome specification. The out
I've tried this over on the Rstudio forums and they've suggested i post here/azure support. Azure doesn't seem to be helping right now so if anybody has any sug
I am trying to bold my y-axis. The title for the axis is bold, but I can't seem to figure out how to bold the number themselves. Here is my code so far, combi
I have a dataframe with some id's and some dates. I want to be able to group the id's by their change in date to create a generalized "grouping_variable". In r