Re: [R] Simulating mid-points from a defined range

2025-06-04 Thread Brian Smith
Richard mentioned? On Wed, 4 Jun 2025 at 17:54, Brian Smith wrote: > > Hi Peter, > > Could you please help me to understand what is the basis of choosing > 55 in runif(10,0,55))? > > Thank you! > > On Wed, 4 Jun 2025 at 02:45, peter dalgaard wrote: > > > &g

Re: [R] Simulating mid-points from a defined range

2025-06-04 Thread Brian Smith
t; > x <- sort(runif(10,0,55)) > > d <- diff(x)+5 > > cumsum(c(x[1],d)) > [1] 12.27815 21.21060 26.37856 36.03812 41.97237 57.02945 67.86113 > [8] 75.74085 81.28533 98.30792 > > > > On 3 Jun 2025, at 09.21, Brian Smith wrote: > > > > Hi Richar

Re: [R] Simulating mid-points from a defined range

2025-06-04 Thread Brian Smith
ort(runif(10,0,55)) >> > d <- diff(x)+5 >> > cumsum(c(x[1],d)) >> [1] 12.27815 21.21060 26.37856 36.03812 41.97237 57.02945 67.86113 >> [8] 75.74085 81.28533 98.30792 >> >> >> > On 3 Jun 2025, at 09.21, Brian Smith wrote: >> > >>

Re: [R] Simulating mid-points from a defined range

2025-06-03 Thread Brian Smith
gt; clear. > > On Sun, 1 Jun 2025 at 6:52 AM, Brian Smith wrote: >> >> Hi, >> >> Let say I have a range [0, 100] >> >> Now I need to simulate 1000 10 mid-points within the range with >> accuracy upto second decimal number. >> >> Let s

Re: [R] Simulating mid-points from a defined range

2025-06-03 Thread Brian Smith
; >> On Saturday, May 31st, 2025 at 6:09 PM, Bert Gunter >> wrote: >> >> > >> > >> > If this is a real problem and not homework, can you tell us the >> > context? It is not at all clear (to me) what you mean by "simulate", >> >

[R] Simulating mid-points from a defined range

2025-05-31 Thread Brian Smith
Hi, Let say I have a range [0, 100] Now I need to simulate 1000 10 mid-points within the range with accuracy upto second decimal number. Let say, one simulated set is X1, X2, ..., X10 Ofcourrse X1 < X2 < ... https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide https:/

Re: [R] Generate random vectors (continuous number) with a fixed sum

2025-04-24 Thread Brian Smith
one million 2d vectors > system.time( >res1mil <- gen_mat(1e6, a, b, s) > ) > #>user system elapsed > #>3.010.063.86 > > old_par <- par(mfrow = c(1, 2)) > hist(res1mil[1L,]) > hist(res1mil[2L,]) > par(old_par) > > > Hope this

Re: [R] Generate random vectors (continuous number) with a fixed sum

2025-04-22 Thread Brian Smith
i.e. we should have all elements of Reduce("+", res) should be equal to s = 0.05528650577311 My assertion is that it is not happing here. On Tue, 22 Apr 2025 at 22:20, Brian Smith wrote: > > Hi Rui, > > Thanks for the explanation. > > But in this case, are we loo

Re: [R] Generate random vectors (continuous number) with a fixed sum

2025-04-22 Thread Brian Smith
rote: > > Às 12:39 de 22/04/2025, Brian Smith escreveu: > > Hi Rui, > > > > Many thanks for your time and insight. > > > > However, I am not sure if I could understand the code. Below is what I > > tried based on your code > > > > library(S

Re: [R] Generate random vectors (continuous number) with a fixed sum

2025-04-22 Thread Brian Smith
gt; Hello, > > Inline. > > Às 16:08 de 21/04/2025, Rui Barradas escreveu: > > Às 15:27 de 21/04/2025, Brian Smith escreveu: > >> Hi, > >> > >> There is a function called RandVec in the package Surrogate which can > >> generate andom vectors (c

[R] Generate random vectors (continuous number) with a fixed sum

2025-04-21 Thread Brian Smith
Hi, There is a function called RandVec in the package Surrogate which can generate andom vectors (continuous number) with a fixed sum The help page of this function states that: a The function RandVec generates an n by m matrix x. Each of the m columns contain n random values lying in the inter

[R] Drawing a sample based on certain condition

2025-04-14 Thread Brian Smith
Hi, For my analytical work, I need to draw a sample of certain sample size from a denied population, where population members are marked by non-negative integers, such that sum of sample members if fixed. For example, Population = 0:100 Sample_size = 10 Sample_Sum = 20 Under this setup if my sam

[R] Loading multiple packages with install.packages()...

2024-09-23 Thread Brian Lunergan
ge individually between the brackets?? 😕️ Regards... - -- Brian Lunergan Russell, Ontario Canada -BEGIN PGP SIGNATURE- iQEzBAEBCgAdFiEETYnejayhh3NYXwphdgjwxcHhY5wFAmbxmNIACgkQdgjwxcHh Y5wR9wf7BDbw9feBoJ/F6y3vHCNxuksaDJn263ur9HKFgJYwH

Re: [R] Manually calculating values from aov() result

2024-08-07 Thread Brian Smith
Hi, Thanks for this information. Is there any way to force R to use Type-1 SS? I think most textbooks use this only. Thanks and regards, On Wed, 7 Aug 2024 at 17:00, Duncan Murdoch wrote: > > On 2024-08-07 6:06 a.m., Brian Smith wrote: > > Hi, > > > > I have

[R] Manually calculating values from aov() result

2024-08-07 Thread Brian Smith
Hi, I have performed ANOVA as below dat = data.frame( 'A' = c(-0.3960025, -0.3492880, -1.5893792, -1.4579074, -4.9214873, -0.8575018, -2.5551363, -0.9366557, -1.4307489, -0.3943704), 'B' = c(2,1,2,2,1,2,2,2,2,2), 'C' = c(0,1,1,1,1,1,1,0,1,1)) summary(aov(A ~ B * C, dat)) However now I also trie

[R] emmeans (component = " response", type = "response")

2024-06-26 Thread Cade, Brian S via R-help
estimated in emmeans? I was led to believe that components="response" , type = "response" would do that but that does not seem to be the case. Thank you Brian Brian S. Cade, PhD U. S. Geological Survey (emeritus) Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Colli

Re: [R] Could you manually replicate execution of a R function

2023-09-22 Thread Brian Smith
Hi Ivan, Thanks for pointing this out. It now matches. Thanks and regards, On Thu, 21 Sept 2023 at 13:04, Ivan Krylov wrote: > > On Tue, 19 Sep 2023 23:09:18 +0530 > Brian Smith wrote: > > > C = rep(0, length(D)) > > N = length(D) > > In the VaRDurTest fun

[R] Unable to manually replicate execution of a R function

2023-09-20 Thread Brian Smith
Hi, ** In may earlier post there were some typo, so reposting the same after correction** I am trying to replicate a function from rugarch package manually. Below is the calculation based on the function, library(rugarch) data(dji30ret) spec = ugarchspec(mean.model = list(armaOrder = c(1,1), inc

[R] Could you manually replicate execution of a R function

2023-09-19 Thread Brian Smith
Hi, I have trying to replicate a function from rugarch package manually. Below is the calculation based on the function, library(rugarch) data(dji30ret) spec = ugarchspec(mean.model = list(armaOrder = c(1,1), include.mean = TRUE), variance.model = list(model = "gjrGARCH"), distribution.model = "s

[R] igraph: layout help

2022-06-11 Thread Brian Smith
Hi, I was trying to make a network plot of this data: library(igraph) library(network) df1 <- data.frame(from="A",to=c("B","C","D","E","F","G"),value=1) df2 <- data.frame(from="K",to=c("L","M","N"),value=1) df3 <- data.frame(from="A",to="K",value=3) my.df <- rbind(df1,df2,df3) my.g

[R] Problem installing/updating nloptr...

2022-05-19 Thread Brian Lunergan
not stat 'nlopt/include/*': No such file or directory Uninstalled the package and tried reinstalling. Same stumble so I now no longer have it at all, and it's needed to load Rcmdr. Any help sorting this out would be appreciated. Please... :-( - -- Brian

Re: [R] [EXTERNAL] Is there a canonical way to pronounce CRAN?

2022-05-04 Thread Cade, Brian S via R-help
CRAN as in cranberry. Just my minor thought. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO 80526-8818 email: ca...@usgs.gov<mailto:brian_c...@usgs.gov> tel: 970 226-9326 From:

[R] complicated time series filtering issue

2022-04-04 Thread Cade, Brian S via R-help
-08 57084544 16741008.5984.31 252 10-Aug-08 57084544 16841002.8 1008.5 10 253 22-Oct-08 57084544 1757 977.6 1002.8 73 254 2-Dec-08 57084544 17981000.6977.6 41 Brian Brian S. Cade, PhD U

Re: [R] Puzzled about loading the Rattle interface package...

2021-12-07 Thread Brian Lunergan
On 2021-12-07 6:44 a.m., Ivan Krylov wrote: > On Mon, 6 Dec 2021 19:33:25 -0500 > Brian Lunergan wrote: > >> Running R 4.1.2 on Linux Mint 19.3. > >> configure: error: GTK version 2.8.0 required > > Thanks for mentioning your GNU/Linux distro! You need the libgtk2

[R] Puzzled about loading the Rattle interface package...

2021-12-07 Thread Brian Lunergan
ntly needs the RGtk2 package to run its graphic state. When I try to install that package I get the following: > install.packages("RGtk2") Installing package into ‘/home/brian/R/x86_64-pc-linux-gnu-library/4.1’ (as ‘lib’ is unspecified) trying URL 'https://cloud.r-project.org

Re: [R] Warning msg after reinstall?

2021-11-07 Thread Brian Lunergan
ays an option if you can fix the support libraries. > > On November 7, 2021 2:07:20 PM PST, Brian Lunergan wrote: >> Evening gents: >> >> First to quickly try and set the scene. >> >> I run R on Linux Mint 19.3. I had version 3.5 installed, but wanted to >&g

[R] Warning msg after reinstall?

2021-11-07 Thread Brian Lunergan
27;No such file or directory' I'm not really sure. I assume I got sloppy withe deletions. I ask for assistance to solve this. What does it mean? What can I do to correct the error? Thanks in advance. ttyl... -- Brian Lunergan Pavillon Marionville Russell, Ontario Canada

[R] Error msg trying to load R Commander with an older R edition...

2021-09-13 Thread Brian Lunergan
te? Any assistance would be greatly appreciated. Kind regards... -- Brian Lunergan Pavillon Marionville Russell, Ontario Canada OpenPGP_signature Description: OpenPGP digital signature __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see http

[R] Using R to analyse Court documents

2021-07-20 Thread Brian Smith
Hi, I am wondering if there is some references on how R can be used to analyse legal/court documents. I searched a bit in internet but unable to get anything meaningful. Any reference will be very appreciated. Thanks for your time. Thanks and regards, __

[R] GSOC 2021: Project Mentors, Please Post Project Ideas!

2021-02-18 Thread Brian G. Peterson
ld have at least two mentors for your project.  Please reach out to us with questions! Regards, Brian   -- Brian G. Peterson ph: +1.773.459.4973 im: bgpbraverock -- You received this message because you are subscribed to the Google Groups "gsoc-r" group. To unsubscribe from this grou

Re: [R] ggplot2 + coord_cartesian + automatic ylim

2020-12-13 Thread Brian Beckage
David, Great suggestion! Thanks, Brian On Dec 13, 2020, at 6:06 PM, David Winsemius mailto:dwinsem...@comcast.net>> wrote: On 12/13/20 12:49 PM, Brian Beckage wrote: As an example to illustrate my question, if I used the following code to plot the price of Apple stock usi

[R] ggplot2 + coord_cartesian + automatic ylim

2020-12-13 Thread Brian Beckage
tilized by ggplot to set the ylim? Or more generally, how do you step through code like to this to examine for instance what exactly coord_x_date is doing? Thanks, Brian [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] [EXTERNAL] Re: overlaying graphs in xYplot (Hmisc)

2020-04-22 Thread Cade, Brian S via R-help
All the xYplot() functions using Cbind() or cbind() does just exactly what I want (Cbind provides aplot of 3 summary statistics and cbind provides the raw values). I just cannot find anyway to overlay them. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150

[R] overlaying graphs in xYplot (Hmisc)

2020-04-22 Thread Cade, Brian S via R-help
separately, but I would really like to have them overlayed on each other. I've tried various approaches with add=T, new=T, etc and none of those seem to work with xYplot(). Any pointers? Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bl

Re: [R] Problem launching Rcmdr

2020-03-16 Thread Brian Grossman
John, It appears that the new version of R 3.6.3 does not have this issue. I will be doing more testing and will let you know if we have any issues. Thank you for your assistance, Brian On Tue, Mar 10, 2020 at 8:46 AM Fox, John wrote: > Dear Brian, > > Normally I'd expect th

Re: [R] Problem launching Rcmdr

2020-03-11 Thread Brian Grossman
running library(Rcmdr) and it launched successfully. I'm not sure what that means, but hopefully someone else will. Thank you, Brian On Wed, Mar 11, 2020 at 1:02 PM Fox, John wrote: > Dear Bernhard, Peter, and Brian, > > Thanks, Peter, for the suggestion. If you're right then th

[R] Problem launching Rcmdr

2020-03-09 Thread Brian Grossman
I'm having a problem with launching Rcmdr. When I try to launch it the first time through R using the command library(Rcmdr) it will go through the process of launching and get to the point where it says "Registered S3 methods overwritten by 'lme4': method from cooks.d

Re: [R] issue with numeric

2019-12-18 Thread Brian Kreeger
*snip* Error in cor(D[, 18 + exon_offset], D[, 19 + exon_offset]) : 'x' must be numeric *snip* You are applying the correlation function to non-numeric variables. Brian On Wed, Dec 18, 2019 at 12:23 PM Ana Marija wrote: > Hello, > > I was running this code, located at: &

[R] grep

2018-07-16 Thread Brian Smith
Hi, I was trying to find a pattern ("ABHD14A") in a character string ('xgen' in example below) using grepl. Note that the individual members may be separated by a semi-colon. The correct answer should return: "ABHD-ACY1 ; ABHD14A" "ABHD14A ; YYY" I have tried three approaches, but still seem a

[R] numeric comparison error

2018-06-18 Thread Brian Smith
Hi, I am a little bit perplexed at why I am getting some values as FALSE: > cpgbins <- seq(0,1,0.05) > cpgbins [1] 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1.00 > cpgbins[1] == 0.00 [1] TRUE > cpgbins[2] == 0.05 [1] TRUE > cpgbins[3] =

[R] R 3.5 and RTools

2018-04-30 Thread Brian Davis
I 'd like to confirm. Thanks in advance, Brian __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] question regarding the AICcmodavg package

2018-02-20 Thread Cade, Brian
among predictors and some don't. Stick to model averaging the predicted responses and you can do something that is sensible and that can be applied to any combination of predictor variables including those with interactions. Brian Cade Brian S. Cade, PhD U. S. Geological Survey Fort Co

[R] glm$effects

2018-01-12 Thread Cade, Brian
stant quantity except for one of the values. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO 80526-8818 email: ca...@usgs.gov tel: 970 226-9326 [[alternative HTML version de

[R] warnings about factor levels dropped from predict.glm

2017-12-05 Thread Cade, Brian
version of R (not sure what number hers is) on her Mac, she gets these warnings constantly. I've checked some records manually by doing the algebra and the predict.glm() function is working correctly incorporating the factor levels on my machine. Any thoughts??? Brian Brian S. Cade, PhD

[R] par(mfrow) for heatmap plots

2017-07-23 Thread Brian Smith
Hi, I was trying to use par(mfrow) to put 4 heatmaps on a single page. However, I get one plot per page and not one page with 4 plots. What should I modify? Test code is given below: test = matrix(rnorm(60), 20, 3) pdf(file='test.pdf',width=10,height=8) par(mfrow=c(2,2)) heatmap(test) heatmap(te

Re: [R] ggplot2 geom_bar arrangement

2017-06-27 Thread Brian Smith
; > # set the factor levels to the same order as observed in the data frame > df$Lab <- factor(df$Lab, levels=unique(df$Lab)) > > px <- ggplot(df,aes(Lab,valuex,label=Lab)) + > geom_text(aes(y=0)) + > geom_bar(stat = "identity") > px > > Jean > >

[R] ggplot2 geom_bar label justification

2017-06-27 Thread Brian Smith
Hi, I was trying to make a horizontal bar plot. The barplot works when the text labels are of reasonable length, but not if some of them are slightly long. I think the long ones get 'squeezed' by default before the plot is flipped and keep the skew after the flip. Is there a way I can get around t

[R] ggplot2 geom_bar arrangement

2017-06-27 Thread Brian Smith
Hi, I was trying to draw a geom_bar plot. However, by default, the bars are arranged according to the label, which I don't want. I want the bars to appear exactly as they appear in the data frame. For example in the code: Lab=c(letters[4:6],letters[1:3]) valuex = c(3.1,2.3,0.4,-0.4,-1.2,-4.4)

Re: [R] Jagged ROC curves?

2017-06-26 Thread Brian Smith
i', ylab='', xlab='') plot(smooth(roc_1),col="brown3", lwd=2, add=T, lty=1) I guess most ROCs that I've seen are somewhere in between, i.e. they have a little jaggedness, but not as much as in plot #1 above" thanks! On Mon, Jun 26, 2017 at 12:59 PM, Marc S

[R] Jagged ROC curves?

2017-06-26 Thread Brian Smith
Hi, I was trying to draw some ROC curves (prediction of case/control status), but seem to be getting a somewhat jagged plot. Can I do something that would 'smooth' it somewhat? Most roc curves seem to have many incremental changes (in x and y directions), but my plot only has 4 or 5 steps even tho

[R] Extract cells and their adjacent cells that may appear anywhere in a dataframe.

2017-05-08 Thread Brian Leo
appreciated. Brian [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

Re: [R] non-parametric manova with post-hoc test

2017-01-18 Thread Cade, Brian
uping structure. There are several R packages that I think implement MRPP but the Blossom package might be one of the better implementations in terms of alternatives provided (including permutation version of Hotelling's test). Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Scie

Re: [R] GAM with the negative binomial distribution: why do predictions no match with original values?

2016-11-22 Thread Cade, Brian
Well part of the issue is that the negative binomial estimates are for means and they can differ a fair bit from the raw counts, but I'm also guessing that part of the issue is that the offset may not be accounted for with the predict.gam() function. Brian Brian S. Cade, PhD U. S. Geolo

Re: [R] Confidence interval on quantile regression (quantreg)

2016-10-19 Thread Cade, Brian
, this typically happens for smaller sample sizes, more extreme taus, and more complex models. But unusual distributional characteristics of the data distributions can also contribute to this issue. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg

Re: [R] box type in Hmisc xYplot

2016-09-15 Thread Cade, Brian
No even in xyplot() the scales argument is not eliminating plotting of the top and right graph axes. It is not the scale of the axes I want eliminated but the actual lines. But thank you for trying. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave

[R] box type in Hmisc xYplot

2016-09-15 Thread Cade, Brian
Does anyone know how to change the box type in Hmisc package function xYplot. I want only the left and bottom axes drawn, similar to what I would accomplish with bty="l" argument in plot() function. bty= argument did not do anything for me in xYplot(). Brian Brian S. Cade,

Re: [R] R-square prob is not calculated by randomization in lmPerm::lmp

2016-09-06 Thread Cade, Brian
rcept term the permutation test for Ho: B1 = B2 = ... Bp = 0 (i.e., all coefficients other than the intercept = 0) is equivalent to a permutation test for Ho: R-squared = 0. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO

Re: [R] transposing x and y axes in xYplot

2016-08-23 Thread Cade, Brian
Bert: Yes, with some fiddling of axes labels this looks like just what I needed. Thank you. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO 80526-8818 email: ca...@usgs.gov tel: 970 226-9326 On Tue, Aug 23, 2016 at

[R] transposing x and y axes in xYplot

2016-08-23 Thread Cade, Brian
Is there a simple way to transpose the x and y axes with the xYplot() function in the Hmisc package, where y is a vector of point estimate and lower and upper confidence interval endpoints? What I'm looking for is something akin to coord_flip() used with ggplot(). Brian Brian S. Cade, PhD

Re: [R] glmmLasso with interactions errors

2016-07-14 Thread Cade, Brian
It has never been obvious to me that the lasso approach can handle interactions among predictor variables well at all. I'ld be curious to see what others think and what you learn. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C

Re: [R] Linear model vs Mixed model

2016-07-13 Thread Cade, Brian
th an estimated variance to locate the subject specific intercepts. Why do you think those modeled intercepts should exactly coincide with your fixed effects intercepts that makes no such distributional assumption? Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center

Re: [R] Linear model vs Mixed model

2016-07-12 Thread Cade, Brian
easily compared to the lmer() model estimates. They are close but will never be identical as the lmer() model estimates are based on assuming a normal distribution with specified variance. They rarely would be identical. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science

Re: [R] Power Calculation:2-sided exact equivalence test for Binomial Proportions

2016-06-07 Thread Cade, Brian
MJ: I think the EnvStats package has various power functions for binomial applications (also confidence interval half-widths). Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO 80526-8818 email: ca...@usgs.gov tel: 970

Re: [R] x-axis tick marks on log scale plot

2016-05-19 Thread Brian Smith
> -- > https://www.researchgate.net/profile/Ivan_Calandra > https://publons.com/author/705639/ > > > Le 19/05/2016 à 15:40, Brian Smith a écrit : > >> Hi, >> >> I have a plot with log scale on the axes. How do I add ticks and labels in >> addition to th

[R] x-axis tick marks on log scale plot

2016-05-19 Thread Brian Smith
Hi, I have a plot with log scale on the axes. How do I add ticks and labels in addition to the ones provided by default? Can I specify where I want the ticks and labels? For example: set.seed(12345) x <- sample(1:1,10) y <- sample(1:1,10) plot(x,y,log="xy") For me, this plot has tick

Re: [R] lm() with spearman corr option ?

2016-04-29 Thread Cade, Brian
I think you would just need to replace the lm() function call with cor(x,y,method="spearman". It would probably be more informative to actually plot by the magnitude of the correlation coefficient (all |r| >= 0.20 or something similar) rather than just by those with P <=0.05.

Re: [R] Heteroscedasticity in a percent-cover dataset

2016-04-15 Thread Cade, Brian
, and incorporate predictor variables any way you would in any other linear (or generalized linear) model. There even are mixed-effects versions of quantile regression now (package lqmm) but I haven't used them enough to speak to their veracity and value. Brian Brian S. Cade, PhD U. S. Geolo

Re: [R] Reducing of car package when loading

2016-02-02 Thread Brian Bolt
I am not sure what functions I use in car actually. I am dependent on the drc package which imports "car". The main drc function I use is "drm", along with "LL.4" https://cran.r-project.org/web/packages/drc/index.html <https://cran.r-project.org/web/packa

[R] Reducing of car package when loading

2016-01-29 Thread Brian Bolt
to not load all of the datasets? Thanks, Brian [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Right censored data, abundant in zeros for regression analysis.

2015-12-28 Thread Cade, Brian
quantiles associated with the mass of zeros. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO 80526-8818 email: ca...@usgs.gov tel: 970 226-9326 On Thu, Dec 24, 2015 at 6:41 AM, REES T. (706713) < t.rees.706...@swansea.ac

[R] ChAMP: champ.runCombat error with methylation 450k data

2015-12-07 Thread Brian Smith
Hi, I was trying to run COMBAT on methylation data, but keep on getting an error: Error in while (change > conv) { : missing value where TRUE/FALSE needed The error occurs irrespective of whether I give the entire or reduced (variation filter keeps only about 140k CpGs) datasets. Is there any o

[R] ggplot2: remove axis ticks

2015-12-07 Thread Brian Smith
Hi, I was trying to remove the axis tick marks and their values using theme() but haven't had much success. Here is sample code: rx <- sample(1:100,10) ry <- sample(1:100,10) rz <- sample(letters[1:3],10,replace=T) rdf <- data.frame(rx,ry,rz) p <- ggplot(rdf,aes(x=rx,y=ry)) p1 <- p + geom_point(

[R] ggplot2: Controlling width of line

2015-10-30 Thread Brian Smith
Hi, I was trying to increase the size of certain lines in my plot (samples 'B' and 'D' in example below). However, when I try to modify the line size, I seem to screw up the linetypes. Also, is there a way to reflect the line size in the legend? Here is some sample code for illustration: library

Re: [R] monte carlo simulations in permanova in vegan package

2015-10-27 Thread Cade, Brian
Sean: There are only 20 possible combinations, 6!/(3! x 3!), so you just need to enumerate them completely (no Monte Carlo approximation required). I don't know if permanova() can do this but you can do it with the mrpp() functions and argument (,exact=TRUE) in Blossom package for R.

Re: [R] algorithmic method quantile regression

2015-10-15 Thread Cade, Brian
han for the br (standard Barrodale and Roberts simplex linear program) algorithm. All conditions that could lead to different estimates. My recommendation for the sample sizes you are considering is to stick with the Barrodale and Roberts algorithm as it is the best understood, most reliable procedure.

Re: [R] Comparing two populations based on the percentile values calculated from two independent samples

2015-09-24 Thread Cade, Brian
h quantile regression. Ecological Applications 21: 281-289) for some examples. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO 80526-8818 email: ca...@usgs.gov tel: 970 226-9326 On Thu, Sep 24, 2015 at 12:31 PM, Mohamed A.Ab

[R] Unexpected/undocumented behavior of 'within': dropping variable names that start with '.'

2015-09-20 Thread Brian
a data frame you don't have to remove all extra variables at the end). I just wish it was documented. Cheers, Brian sessionInfo() R version 3.1.0 (2014-04-10) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8

[R] Unable to get the 64-bit version of R (3.2.1 Terminal or GUI) to start on a Windows 7 machine

2015-08-18 Thread brian
I am unable to get the 64-bit version of R (3.2.1 Terminal or GUI) to start on a Windows 7 machine. I can get the 32-bit to start, just not the 64-bit. I am receiving a dialog box box that points me to four files but nothing seems usable when examining them. Installed to C:\Dev\R\R-3.2.1. I hav

Re: [R] dplyr help

2015-07-29 Thread Brian Kreeger
​dplyr solution: bevs %>% group_by(name, sex, drink) %>% summarise(​cost = sum(cost)) %>% select(name, drink, cost, sex) The last select statement puts the output in the column order you wanted in your result. I hope this helps. Brian On Wed, Jul 29, 2015 at 9:37 PM, Jon BR wrote:

Re: [R] how to read a local JSON file

2015-06-07 Thread Prof Brian Ripley
there are embedded nuls in the file. If you know the file is not a normal text file, use warn = FALSE. -- Brian D. Ripley, rip...@stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford 1 South Parks Road, Oxford OX1 3TG, UK _

Re: [R] alternatives to KS test applicable to K-samples

2015-06-01 Thread Cade, Brian
Not sure what the issue is here. If I click on the link I provided, I go right to the USGS page where instructions for downloading the software are provided. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO 80526-8818

Re: [R] Arrays of variable dimensionality

2015-05-30 Thread Prof Brian Ripley
TML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. PLEA

Re: [R] alternatives to KS test applicable to K-samples

2015-05-29 Thread Cade, Brian
samples but only for univariate responses. Both are included in the USGS Blossom package for R linked here: https://www.fort.usgs.gov/products/23735 (not yet distributed via CRAN). The MRPP may also be available in other R packages on CRAN (vegan ?). Brian Brian S. Cade, PhD U. S. Geological Survey

Re: [R] Problem with particular file in XML package?

2015-05-27 Thread Prof Brian Ripley
tat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html PLEASE do, including what it says about HTML mail, 'at a minimum' information required and upgrading before posting: R 3.1.2 is already 2 versions obsolete. -- Brian D. Ripley

Re: [R] Simulating a time series with a given spectrum

2015-05-27 Thread Prof Brian Ripley
esearch Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center ***Note new address and phone*** 110 Shaffer Road Santa Cruz, CA 95060 Phone: (831)-420-3666 Fax: (831) 420-3980 e-mail: roy.mendelss...@noaa.gov www: http://www.pfeg.noaa.gov/ -- Brian D. Ripley,

Re: [R] Remove entry with sensitive information from history

2015-05-27 Thread Prof Brian Ripley
nd provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, rip...@stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford 1 South Parks Road, Oxford OX1 3TG, UK __ R-help@r-project.org ma

Re: [R] X11 font problem

2015-05-27 Thread Prof Brian Ripley
UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. PLEASE do. -- Brian D. Ripley, rip...@stats.ox.ac.uk Emer

Re: [R] plot: rug colors

2015-05-24 Thread Brian Smith
Thanks Duncan! That works! On Sun, May 24, 2015 at 8:09 AM, Duncan Murdoch wrote: > On 24/05/2015 7:47 AM, Brian Smith wrote: > > Hi, > > > > I wanted the rug (in plot) to have different colors. For example: > > > > vals1 <- sample(1:100,5) > > vals2 &l

[R] plot: rug colors

2015-05-24 Thread Brian Smith
Hi, I wanted the rug (in plot) to have different colors. For example: vals1 <- sample(1:100,5) vals2 <- sample(1:100,5) rugcols <- c("red","blue","brown","red","yellow") plot(vals1,vals2) rug(vals1,col=rugcols,lwd=2) However, with this code I only get 'red' for all the ticks. Is there a way I

Re: [R] Selective package installation

2015-05-18 Thread Prof Brian Ripley
can I do this ? Take a look at the code of the built-in function new.packages(): what you ask for is a variant on what it does. -- Brian D. Ripley, rip...@stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford 1 South Parks Road, Oxford OX1 3TG, UK

Re: [R] Drawing the regression line and the 95% confidence intervals

2015-05-06 Thread Cade, Brian
The prediction intervals are likely to be much wider than the confidence intervals so you will need to be sure you scale the yaxis limits large enough to see them. Brian Brian S. Cade, PhD U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO 80526-8818

Re: [R] R MSI Installer

2015-04-24 Thread Prof Brian Ripley
, reproducible code. PLEASE do: no HTML for a start. -- Brian D. Ripley, rip...@stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford 1 South Parks Road, Oxford OX1 3TG, UK __ R-help@r-project.org mailing list -- To

Re: [R] rgdal installation with two versions of GDAL

2015-04-22 Thread Prof Brian Ripley
gest to the GDAL maintainers (and finding them is part of libtool which GDAL uses). But (see the posting guide) the generic question belonged on R-devel and questions about rgdal on R-sig-geo. Thanks, Rob PLEASE do read the posting guide http://www.R-project.org/posting-gui

Re: [R] erv.inv NOT FOUND

2015-04-20 Thread Prof Brian Ripley
led (which includes all of CRAN). -- Brian D. Ripley, rip...@stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford 1 South Parks Road, Oxford OX1 3TG, UK __ R-help@r-project.org mailing list -- To UNSUBSCRIBE

Re: [R] Finding which seed resulted in a specific sample

2015-04-13 Thread Prof Brian Ripley
ot;,"e"))<4L){ # I would have used identical() seed <- seed+1L set.seed(seed) x <- sample(letters,4L,replace=T) } seed gave me an answer (543867) Thank you very much, Isabel Natario -- Dep. Matemática Faculdade de Ciências e Tecnologia Universidade Nova de Lis

Re: [R] Can't load CARET package, on Mac OS X (latest), on R version 3.1.2 (2014-10-31)

2015-04-12 Thread Prof Brian Ripley
nd more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, rip...@stats.ox.ac.uk Emeritus Pr

Re: [R] C compilation error (unknown type R_xlen_t) when installing Rmpi package

2015-04-08 Thread Prof Brian Ripley
ves a version of Rmpi as old as your version of R (or at least earlier than 3.0.0) and install that. Note to the maintainer (Cc:ed) -- you need to correct the R version dependence. -- Brian D. Ripley, rip...@stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of

Re: [R] R crashes upon changing directories, loading files, etc.

2015-04-06 Thread Prof Brian Ripley
ting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, rip...@stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford 1 South Parks R

Re: [R] ggplot: connect points with line (not in order)

2015-04-05 Thread Brian Smith
ts-in-ggplot2-in-r > > > > -- > | > > http://billyam.com || http://use-r.com || http://shinyserver.com (BETA) > > SAS Certified Base Programmer for SAS 9 > Oracle SQL Expert(11g) > > > > On Sun, Apr 5, 2015 at 9:03 PM, Brian Smith > wrote: > > Hi

[R] ggplot: connect points with line (not in order)

2015-04-05 Thread Brian Smith
Hi, I am trying to connect points, but not in a different order than the default value in ggplot. For example: xx <- sample(1:100,5) yy <- sample(1:100,5) mydat <- data.frame(xx,yy) print(mydat) ggplot(mydat,aes(xx,yy)) + geom_point() + geom_line() I want to connect the points as the

  1   2   3   4   5   6   7   8   9   10   >