r Questions

2

In R, I have some rather unusually formatted strings in a data.frame column that I would like to split by commas (i.e., each element of the column is a string of individual values separated by comm...
Ectropion asked 23/9 at 13:29

2

Solved

I like to interpolate a time series, so that the timestamp is exact 0.1 Hz. So the first step maybe would be something like library(tidyverse) library(zoo) options(digits.secs = 3, pillar.sigfig ...
Osteoma asked 18/9 at 14:26

4

Let's consider markers with their coefficient of variation (cv) and three reference cv (rcv): Initial data: marker cv rcv1 rcv2 rcv3 <chr> <dbl> <dbl> <dbl> <dbl> 1 ...
Selenite asked 20/9 at 8:6

2

Junior R developer here. I'm not really completely clear on the meaning of the LinkingTo field in an R package's dependencies. What I would like to do is remove the package BH after the installat...
Nipha asked 23/1, 2019 at 20:43

5

Solved

I have this data: simulated_states = c("A", "E", "B", "B", "A", "C", "D", "A", "B", "D", "A&...
Nedry asked 19/9 at 2:8

3

Solved

I am trying to write a code that will allow me to automate the calculation of a population estimate on summarized capture data based on two-pass depletion methods used in fisheries. The equation to...
Bratcher asked 17/9 at 22:48

1

I have data from a study using a 2x2x3 repeated measures design. Participants provided a numeric response ('tcons') at two time-points (test: 'pre', 'post'). They were further grouped with respect ...
Speller asked 19/9 at 5:30

8

Solved

I would like to populate a matrix by row based on a function which gives the seq() of a number seq(1) 1 seq(2) 1 2 and so on matrixinp = matrix(data=NA, nrow=6, ncol=6) > print(matrixinp) [...
Detent asked 17/9 at 10:51

2

Solved

I'd like to sample rows from a data frame by group. But here's the catch, I'd like to sample a different number of records based on data from another table. Here is my reproducible data: df <- ...
Lamee asked 15/1, 2017 at 21:50

3

Solved

Okay, so I know I could do something like this, mtcars %>% group_by(cyl) %>% sample_n(2) which will give me, Source: local data frame [6 x 11] Groups: cyl [3] mpg cyl disp hp drat w...
Monitor asked 14/10, 2016 at 13:58

2

Solved

There is a strange behavior of lobstr::obj_addr caused by its vectorization over lists, when the list itself doesn't change the address. I just started Advanced R by Wickham (2ed) and reached the 2...
Brambling asked 16/9 at 16:19

1

Solved

Since version 4.4.0, R supports tail recursion through the Tailcall function. I automatically assumed that it means an improvement for codes that use tail recursion. However, consider the following...
Forenamed asked 12/9 at 18:17

2

Solved

Using ggplot2 with geofacet, I want to outline some group of facets with rectangles. I guess I could draw it after the image is saved on disc as .png or .jpg with the magick package, but I would pr...
Abduce asked 12/9 at 12:42

1

Solved

I have a very similar question to the one asked in Half violin plot with different factors in R which was perfectly answered by @AllanCameron. In addition to the data of the mentioned question I al...
Belga asked 15/9 at 18:15

3

Solved

I have this graph network in R: library(igraph) n_rows <- 10 n_cols <- 5 g <- make_lattice(dimvector = c(n_cols, n_rows)) layout <- layout_on_grid(g, width = n_cols) n_nodes <- vco...
Kovar asked 13/9 at 12:49

2

Solved

Here is a code that creates ellipses of 1400 metres length in the main axis and 1000 metres length in the side axis. Each ellipse is assigned with an ID. library(sf) library(ggplot2) library(dplyr)...
r
Archaize asked 12/9 at 15:45

3

Solved

A minimal Rmarkdown document has a YAML header, markdown syntax and R code chunks. To edit such a multi-language file, I am using the Emacs editor, and the buffer in which the Rmd document is opene...
Irruption asked 30/11, 2016 at 17:8

2

Solved

I have a ID variable that comes from 35 different hospitals, so has varying different arrangements of the variable, and sometimes it has the same root ID number with a secondary line number - e.g. ...
Enigmatic asked 13/9 at 3:20

2

Solved

How can I scale a table to fit a PDF page in Quarto? Example: --- title: "Untitled" format: pdf --- ```{r setup} #| include: false library(dplyr) library(gt) ``` ```{r tbl} #| include...
Vulpecula asked 16/10, 2022 at 19:21

4

I've got some coefficients for a logit model set by a non-r user. I'd like to import those coefficients into r and generate some goodness of fit estimates on the same dataset (ROC and confusion mat...
Chloral asked 6/9, 2014 at 0:6

1

Solved

I have a random graph in R in which one random node is colored red (square) - and all other nodes are colored lighter shades of red relative to their distance from the original node (i.e. based on ...
r
Lennox asked 11/9 at 2:1

3

Solved

I wish to evaluate a vector of strings containing arithmetic expressions -- "1+2", "5*6", etc. I know that I can parse a single string into an expression and then evaluate it as in eval(parse(tex...
Bissonnette asked 26/7, 2014 at 20:25

3

I'm familiar with G*Power as a tool for power analyses, but have yet to find a resource on the internet describing how to compute a power analysis for for logistic regression in R. The pwr package ...
r
Pru asked 1/12, 2014 at 18:20

2

Solved

I've been searching around this morning to try to figure out if the failure below is expected but haven't found anything. Could anyone help point me to a related discussion? Otherwise, I might subm...
Ogrady asked 21/10, 2020 at 13:17

3

Solved

How do I take a cell in Excel, which has text that is hyperlinked, and extract the hyperlink part?
r
Acton asked 10/6, 2014 at 19:58

© 2022 - 2024 — McMap. All rights reserved.