similar to: How to propose changes to R documentation

Displaying 20 results from an estimated 10000 matches similar to: "How to propose changes to R documentation"

2018 May 08
3
Bilateral matrix
or in base R : ?xtabs ?? as in: xtabs(~previous_location + current_location,data=x) (You can convert the 0s to NA's if you like) Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, May 8, 2018 at 9:21 AM, Huzefa
2018 May 16
0
Bilateral matrix
Dear Bert and Huzefa, Apologies for the late reply, my account got hacked and I have just managed to recover it. Thank you very much for your replies and the solutions. Both work well. I was wondering if there was any way to ensure (force) that all possible combinations show up in the output. The full dataset has 25 cities but of course people have not moved from Boston to all the other 24
2018 May 16
2
Bilateral matrix
xtabs does this automatically if your cross classifying variables are factors with levels all the cities (sorted, if you like): > x <- sample(letters[1:5],8, rep=TRUE) > y <- sample(letters[1:5],8,rep=TRUE) > xtabs(~ x + y) y x c d e a 1 0 0 b 0 0 1 c 1 0 0 d 1 1 1 e 1 1 0 > lvls <- sort(union(x,y)) > x <- factor(x, levels = lvls) > y <-
2018 May 17
0
Bilateral matrix
Dear William and Ben, Thank you for your replies and elegant solutions. I am having trouble with the fact that two of the previous locations do not appear in current locations (that is no one moved to OKC and Dallas from other cities), so these two cities are not being included in the output. I have provided a better sample of the data and the ideal output (wide form - a 10x10 bilateral matrix)
2018 May 08
0
Bilateral matrix
Dear Miluji, If I understand correctly, this should get you what you need. temp1 <- structure(list(id = 101:115, current_location = structure(c(2L, 8L, 8L, 3L, 6L, 5L, 1L, 2L, 7L, 4L, 2L, 8L, 8L, 3L, 6L), .Label = c("Austin", "Boston", "Cambridge", "Durham", "Houston", "Lynn", "New Orleans", "New York"), class =
2018 Feb 13
1
LSmeans and lsmeans
Always cc the list unless there is good reason to keep your reply private. There is no LSmeans() function in the lsmeans package. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Feb 13, 2018 at 3:20 PM, Pius Mwansa
2016 Apr 16
2
Mean of hexadecimal numbers
... and if you need to convert back: ?as.hexmode -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Apr 16, 2016 at 8:20 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > ?strtoi > > You'll have to remove
2018 May 08
2
Bilateral matrix
I have data on current and previous location of individuals. I would like to have a matrix with bilateral movement between locations. I would like the final output to look like the second table below. I have tried using crosstab() from the ecodist but I do not have another variable to measure the flow. Ultimately I would like to compute the probability of movement between cities (movement to
2018 May 07
2
Installing required packages with an R package
R-package-devel is the better venue, as r-packages is only for announcements. On May 7, 2018 12:17:34 PM PDT, Bert Gunter <bgunter.4567 at gmail.com> wrote: >This is better posted on the R-packages mailing list, not here. > >Cheers, >Bert > >Bert Gunter > >"The trouble with having an open mind is that people keep coming along >and >sticking things into
2018 Feb 05
2
Package sgd
Good morning, Is there a package that replaces the sgd package to explore the Gradient Descent (SGD) t echnique ? Best regards, *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~ Tony *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~* [[alternative HTML version deleted]]
2018 Feb 13
0
LSmeans and lsmeans
A cursory reading indicates that they are identical; but others more knowledgeable than I need to confirm or deny this. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Feb 13, 2018 at 3:38 PM, Pius Mwansa <pmwansa at
2016 Apr 19
2
Interquartile Range
... and I'm getting another cup of coffee... -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Apr 19, 2016 at 10:30 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > NO NO -- I am wrong! The paste() expression is
2016 Apr 13
3
Decision Tree and Random Forrest
Ok is there a way to do it with decision tree? I just need to make the decision rules. Perhaps I can pick one of the trees used with Random Forrest. I am somewhat familiar already with Random Forrest with respective to bagging and feature sampling and getting the mode from the leaf nodes and it being an ensemble technique of many trees. I am just working from the perspective that I need
2018 Feb 13
1
LSmeans and lsmeans
It is in the doBy package. Thanks From: Bert Gunter [mailto:bgunter.4567 at gmail.com] Sent: Tuesday, February 13, 2018 4:32 PM To: Pius Mwansa <pmwansa at shaw.ca> Cc: R-help <r-help at r-project.org> Subject: Re: [R] LSmeans and lsmeans Always cc the list unless there is good reason to keep your reply private. There is no LSmeans() function in the lsmeans package.
2016 Apr 19
2
Interquartile Range
If you show us, not just tell us about, a self-contained example someone might show you a non-hacky way of getting the job done. (I don't see an argument to plyr::ddply called 'transform'.) Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Apr 19, 2016 at 12:18 PM, Michael Artz <michaeleartz at gmail.com> wrote: > Oh thanks for that clarification Bert! Hope you enjoyed
2016 Apr 20
2
Interquartile Range
Again, IQR returns two both a .25 and a .75 value and it failed, which is why I didn't use it before. Also, the first function just returns tha same value repeating. Since they are the same, before the second call, using the mode function is just a way to grab one value. I could have used average, min, max, they all would have returned the same thing. Mike On Tue, Apr 19, 2016 at 7:24 PM,
2016 Apr 20
2
Interquartile Range
Well, instead of your functions try: Mode <- function(x) { tabx <- table(x) tabx[which.max(tabx)] } and use R's IQR function instead of yours. ... so I still don't get why you want to return a character string instead of a value for the IQR; and the mode of a sample defined as above is generally a bad estimator of the mode of the distribution. To say more than that would
2016 Apr 24
2
Inserting a blank row to every other row
Well, something like this would work (there may be slicker solutions): > z <- data.frame(a=1:3,b = letters[1:3]) > i <- seq_len(nrow(z)) *2 > z <-rbind(z,z) > z[i, ] <- matrix(NA, nr=nrow(z),nc=ncol(z)) > z a b 1 1 a 2 NA <NA> 3 3 c 4 NA <NA> 5 2 b 6 NA <NA> But I agree with you that there is probably a way to handle the underlying
2017 Jul 15
2
select from data frame
If I understand correctly, no looping (ave(), for()) or type casting (as.character()) is needed -- indexing and matching suffice: > with(df, ID[!ID %in% unique(ID[samples %in% c("B","C") ])]) [1] 3 3 Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in
2016 Apr 19
2
Interquartile Range
To be precise: paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-") is an expression that evaluates to a character string: "round(quantile(x,.25),0) - round(quantile(x,0.75),0)" no matter what the argument of your function, x. Hence return(paste(...)) will return this exact character string and never evaluates x. Cheers, Bert Bert Gunter "The