similar to: extract parts of a list before symbol

Displaying 20 results from an estimated 10000 matches similar to: "extract parts of a list before symbol"

2024 Apr 22
2
x[0]: Can '0' be made an allowed index in R?
You could have negative indices. There are two ways to do this. 1) provide a large offset. Offset <- 30 for (i in -29 to 120) { print(df[i+Offset])} 2) use absolute values if all indices are negative. for (i in -200 to -1) {print(df[abs(i)])} Tim -----Original Message----- From: R-help <r-help-bounces at r-project.org> On Behalf Of Peter Dalgaard via R-help Sent: Monday, April 22,
2024 Feb 05
1
Help
Please see fortunes::fortune(285). cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries) phone: +64-9-373-7599 ext. 89622 Home phone: +64-9-480-4619
2024 Apr 22
1
x[0]: Can '0' be made an allowed index in R?
See fortunes::fortune(36). cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries) phone: +64-9-373-7599 ext. 89622 Home phone: +64-9-480-4619
2024 Feb 27
1
Interactions in regression
I have no real idea what you are trying to do, but if a table is what you want, you can probably get it using the table() function. Or, more likely, the xtabs() function. Using your example from an earlier post (adjusted to make it comprehensible to the human mind): set.seed(1000) time <- factor(rep(c("Pre","Post"),each=200)) treatment <-
2024 Apr 22
1
x[0]: Can '0' be made an allowed index in R?
Heh. Did anyone bring up negative indices yet? -pd > On 22 Apr 2024, at 10:46 , Rolf Turner <rolfturner at posteo.net> wrote: > > > See fortunes::fortune(36). > > cheers, > > Rolf Turner > > -- > Honorary Research Fellow > Department of Statistics > University of Auckland > Stats. Dep't. (secretaries) phone: > +64-9-373-7599
2024 Feb 28
1
Interactions in regression
Hi Rolf, No it is not. I don't know to which question did you want to respond ? I desribed everything in my first email and attached links from SO with pictures included, which are quite understandable. Cheers, Jacek wt., 27 lut 2024 o 02:29 Rolf Turner <rolfturner at posteo.net> napisa?(a): > > I have no real idea what you are trying to do, but if a table is > what you
2024 Feb 04
3
Help
I have done a scatter plot in R. I want to insert the coefficient of determination R^2 = 0.62 as a text in the plot. I have tried to write R^2 but could not produce R2. I would appreciate it if someone could help me with the syntax. I have tried: expression(paste("", R^2,"=", 0.62)), but it did not produce R squared, rather it gave me error messages. Thanks. Jibrin Alhassan
2024 Feb 19
1
Help
I am writing my master thesis in which I compared two cultures . So for my statistics I need to compare Age,Sex,Culture as well as have a look at the tasks scores . Anyone familiar with this ? I?d love to share my script so you guide me where I did wrong . Regards
2023 Feb 13
2
Removing variables from data frame with a wile card
x[?V2?] would retain columns of x headed by V2. What I need is the opposite??I need a data grime with those columns excluded. Steven from iPhone > On Feb 13, 2023, at 9:33 AM, Rolf Turner <r.turner at auckland.ac.nz> wrote: > > ? >> On Sun, 12 Feb 2023 14:57:36 -0800 >> Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: >> >> x["V2"]
2024 Apr 23
1
x[0]: Can '0' be made an allowed index in R?
Doesn't sound like you got the point. x[-1] normally removes the first element. With 0-based indices, this cannot work. - pd > On 22 Apr 2024, at 17:31 , Ebert,Timothy Aaron <tebert at ufl.edu> wrote: > > You could have negative indices. There are two ways to do this. > 1) provide a large offset. > Offset <- 30 > for (i in -29 to 120) { print(df[i+Offset])} >
2024 Apr 22
1
x[0]: Can '0' be made an allowed index in R?
Hans, It is a good question albeit R made a conscious decision to have indices that correspond to things like row numbers and thus start with 1. Some others have used a start of zero but often for reasons more related to making use of all combinations of the implementation of integers on many machines where starting with 1 would only allow use of the 255 of the 256 combinations available in 8
2024 Apr 23
2
x[0]: Can '0' be made an allowed index in R?
Hello Peter, Unless I too misunderstand your point, negative indices for removal do work with the Oarray package (though -0 doesn't work to remove the 0th element, since -0 == 0 -- perhaps what you meant): > library(Oarray) > v <- Oarray(1:10, offset=0) > v [0,] [1,] [2,] [3,] [4,] [5,] [6,] [7,] [8,] [9,] 1 2 3 4 5 6 7 8 9 10 > dim(v)
2024 Feb 25
1
Interactions in regression
Hi, I do not want to make a plot, I try to make an output table in R, (in GUI like Stata this is trivially easy task) with regard to SO OP question. As I mentioned, in paper I would not do this, but out of curiosity I use R this time trying to create it. If in R this is trivial task as well, could you please show how to do it ? After googling a lot I did not find solution. regards, Jacek niedz.,
2024 Jan 13
1
Fwd: Strange results : bootrstrp CIs
Sorry, didn't cc this to the list. -------- Forwarded Message -------- Subject: Re: [R] Strange results : bootrstrp CIs Date: Sat, 13 Jan 2024 17:37:19 -0500 From: Duncan Murdoch <murdoch.duncan at gmail.com> To: varin sacha <varinsacha at yahoo.fr> You can debug things like this by setting options(error = recover). That will drop into the debugger when the error occurs.
2023 Aug 25
2
Query on finding root
Sir, I want to solve the equation Q(u)=mean, where Q(u) represents the quantile function. Here my Q(u)=(c*u^lamda1)/((1-u)^lamda2), which is the quantile function of Davies (Power-pareto) distribution. Hence I want to solve , *(c*u^lamda1)/((1-u)^lamda2)=28353.7....(Eq.1)* where lamda1=0.03399381, lamda2=0.1074444 and c=26104.50. When I used the package 'Davies' and solved Eq 1, I got the
2023 May 30
1
depmixs4 standardError() issue
Hello, I've been enjoying using the "Mixture and Hidden Markov Models in R" by Visser & Speekenbrink to learn how to apply these analyses to my own data using depmixS4. I currently have a fitted 4-state mixture model with three emissions variables and one binomial covariate (HS). I am trying to compute confidence intervals using the following code, where fmms4s is the model:
2024 Jan 14
1
Strange results : bootrstrp CIs
Well, this would seem to work: e <- data.frame(Score = Score , Country = factor(Country) , Time = Time) ncountry <- nlevels(e$Country) func= function(dat,idx) { if(length(unique(dat[idx,'Country'])) < ncountry) NA else coef(lm(Score~ Time + Country,data = dat[idx,])) } B <- boot(e, func, R=1000) boot.ci(B, index=2, type="perc")
2023 Jun 25
1
depmixs4 standardError() issue
On Tue, 30 May 2023 17:43:31 +0000 Heather Lucas <hlucas2 at lsu.edu> wrote: > Hello, > > I've been enjoying using the "Mixture and Hidden Markov Models in R" > by Visser & Speekenbrink to learn how to apply these analyses to my > own data using depmixS4. > > I currently have a fitted 4-state mixture model with three emissions > variables and one
2024 Jan 11
4
arrow on contour line
Hello, I am drawing contour lines for a function of 2 variables at one level of the value of the function and want to include a small arrow in any direction of increase of the function. Is there some way to do that? Below is an example that creates the contour lines. How do I add one small arrow on each line in the direction of increase of the function (at some central point of the contour
2023 Feb 05
3
Extracting data using subset function
Dear All, I want to create a vector p and extract first 20 observations using subset function based on logical condition. My code is below p <- 0:100 I know i can extract the first 20 observations using the following command. q <- p[1:20] But I want to extract the first 20 observations using subset function which requires a logical condition. I am not able to frame the logical