[R] Need help testing a problem

2024-01-31 Thread Roy Mendelssohn - NOAA Federal via R-help
HI All: We are trying to figure out a problem that is occurring with a package, and we need a non-NOAA person with a Windows computer with the latest R to test for us what is failing (but works on Macs and Linux from different sites). Part of the problem is there is an Akamai service in

Re: [ESS] ESS[SAS]: experience, fixes, and starting questions

2024-01-31 Thread Frederico Muñoz via ESS-help
Hello, Thank you for your answer. "Sparapani, Rodney via ESS-help" writes: > iESS[SAS] goes way back to the beginning of ESS. At that time, interactive > SAS > was thought to be a good idea. However, batch SAS was quickly adopted as a > more prudent approach given that there was comparatively

Re: [R] Basic astronomy package recommendation wanted.

2024-01-31 Thread Leo Mada via R-help
Dear Richard,

I wrote s small shiny app to improve the search for CRAN-packages. It can be 
installed from GitHub:
https://github.com/discoleo/PackageBrowser

Searching for "(?

Re: [R] Basic astronomy package recommendation wanted.

2024-01-30 Thread Richard O'Keefe
Thank you for the tip about solrad. I don't need it right now, but I shall certainly have a use for it soon. On Wed, 31 Jan 2024 at 02:42, Kevin Thorpe wrote: > > There is also the package solrad that might do some of this. It is more > intended for calculating solar radiation, which is

Re: [R] Basic astronomy package recommendation wanted.

2024-01-30 Thread Richard O'Keefe
Thank you very much. suncalc looks like just what I want. On Tue, 30 Jan 2024 at 23:44, Enrico Schumann wrote: > > On Tue, 30 Jan 2024, Richard O'Keefe writes: > > > Given > > - UTC timestamp > > - a location (latitude,longitude,elevation) > > I want to know > > - the sun angles > > - the

Re: [R] R interpreting numeric field as a boolean field

2024-01-30 Thread Paul Bernal
Hi Bert, After doing sapply(your_dataframe, "class"), it seems like R is recognizing that the field is of type numeric after all, the problem (it seems) is how the import_list() function from the rio package is reading the data (my suspicion). Best regards, Paul El mar, 30 ene 2024 a las 14:59,

Re: [R] R interpreting numeric field as a boolean field

2024-01-30 Thread Paul Bernal
Hi Bert, Below the information you asked me for: nrow(mydataset) [1] 2986276 sapply(mydataset, "class") $`Transit Date` [1] "POSIXct" "POSIXt" $`Market Segment` [1] "character" $`Número de Tránsitos` [1] "numeric" $`Tar No` [1] "character" $`Beam Range (Operations)` [1]

Re: [R] R interpreting numeric field as a boolean field

2024-01-30 Thread CALUM POLWART
And your other option - recode what gets imported. It may well be you will actually want the blanks to be NAs for instance rather than blank. I'm assuming the True and False are >$0 and $0 from your description. (Or maybe vice versa). So I'd have made my column name something like

Re: [R] R interpreting numeric field as a boolean field

2024-01-30 Thread Duncan Murdoch
If you are using the read_excel() function from the readxl package, then there's an argument named col_types that lets you specify the types to use. You could specify col_types = "numeric" to read all columns as numeric columns. If some columns are different types, you should specify a

Re: [R] R interpreting numeric field as a boolean field

2024-01-30 Thread Bert Gunter
Incidentally, "didn't work" is not very useful information. Please tell us exactly what error message or apparently aberrant result you received. Also, what do you get from: sapply(your_dataframe, "class") nrow(your_dataframe) (as I suspect what you think it is, isn't). Cheers, Bert On Tue,

Re: [R] R interpreting numeric field as a boolean field

2024-01-30 Thread Paul Bernal
Dear friend Duncan, Thank you so much for your kind reply. Yes, that is exactly what is happening, there are a lot of NA values at the start, so R assumes that the field is of type boolean. The challenge that I am facing is that I want to read into R an Excel file that has many sheets (46 in this

Re: [R] R interpreting numeric field as a boolean field

2024-01-30 Thread Duncan Murdoch
On 30/01/2024 11:10 a.m., Paul Bernal wrote: Dear friends, Hope you are doing well. I am currently using R version 4.3.2, and I have a .xlsx file that has 46 sheets on it. I basically combined all 46 sheets and read them as a single dataframe in R using package rio. I read a solution using

[R] R interpreting numeric field as a boolean field

2024-01-30 Thread Paul Bernal
Dear friends, Hope you are doing well. I am currently using R version 4.3.2, and I have a .xlsx file that has 46 sheets on it. I basically combined all 46 sheets and read them as a single dataframe in R using package rio. I read a solution using package readlx, as suggested in a StackOverflow

Re: [R] Use of geometric mean for geochemical concentrations

2024-01-30 Thread Rich Shepard
On Tue, 30 Jan 2024, Leo Mada wrote: It depends how the data is generated. Although I am not an expert in ecology, I can explain it based on a biomedical example. Leo, My data are environmental, observational concentrations of water constituents. It's not only how data are generated, what

Re: [R] Use of geometric mean for geochemical concentrations

2024-01-30 Thread Leo Mada via R-help
Dear Rich, It depends how the data is generated. Although I am not an expert in ecology, I can explain it based on a biomedical example. Certain variables are generated geometrically (exponentially), e.g. MIC or Titer. MIC = Minimum Inhibitory Concentration for bacterial resistance Titer =

Re: [R] Basic astronomy package recommendation wanted.

2024-01-30 Thread Kevin Thorpe
There is also the package solrad that might do some of this. It is more intended for calculating solar radiation, which is probably not what you want, but may do other things you may find helpful. > On Jan 30, 2024, at 5:44 AM, Enrico Schumann wrote: > > On Tue, 30 Jan 2024, Richard O'Keefe

Re: [R] linear programming in R | limits to what it can do, or my mistake?

2024-01-30 Thread Jinsong Zhao
On 2024/1/30 20:00, Martin Becker wrote: Apart from the fact that the statement "such that t1+t2+t3+t4=2970 (as it must)" is not correct, the LP can be implemented as follows: I was confused by "such that t1+t2+t3+t4=2970 (as it must)", otherwise, I also get the same solution.

Re: [R] linear programming in R | limits to what it can do, or my mistake?

2024-01-30 Thread Martin Becker
Apart from the fact that the statement "such that t1+t2+t3+t4=2970 (as it must)" is not correct, the LP can be implemented as follows: library(lpSolve) LHS <- rbind( c(0,0,0,0, 1, 0, 0,0), c(1,0,0,0,-1, 1, 0,0), c(0,1,0,0, 0,-1, 1,0), c(0,0,1,0, 0, 0,-1,1), cbind(-diag(4),diag(4)),

Re: [R] Basic astronomy package recommendation wanted.

2024-01-30 Thread Enrico Schumann
On Tue, 30 Jan 2024, Richard O'Keefe writes: > Given > - UTC timestamp > - a location (latitude,longitude,elevation) > I want to know > - the sun angles > - the moon angles > - the phase of the moon. > I looked on CRAN for astronomy, but didn't notice anything that seems > to offer what I

[R] Basic astronomy package recommendation wanted.

2024-01-30 Thread Richard O'Keefe
Given - UTC timestamp - a location (latitude,longitude,elevation) I want to know - the sun angles - the moon angles - the phase of the moon. I looked on CRAN for astronomy, but didn't notice anything that seems to offer what I want. I could try coding these functions myself, but "if you

[R] linear programming in R | limits to what it can do, or my mistake?

2024-01-30 Thread Evan Cooch
Question for 'experts' in LP using R (using the lpSolve package, say) -- which does not apply to me for the sort of problem I describe below. I've run any number of LP's using lpSolve in R, but all of them to date have objective and constraint functions that both contain the same variables.

Re: [R] print data.frame with a list column

2024-01-29 Thread Micha Silver
Excellent, many thanks. On 29/01/2024 16:56, Ivan Krylov wrote: On Mon, 29 Jan 2024 14:19:21 +0200 Micha Silver wrote: Is there some option to force printing the full list? df <- data.frame("name" = "A", "bands" = I(list(1:20))) format.AsIs is responsible for printing columns produced

[ESS] WG: ESS[SAS]: experience, fixes, and starting questions

2024-01-29 Thread Hüsing , Johannes via ESS-help
When I worked with SAS, I used ESS for handling SAS in batch mode. This was working perfectly for me. Among the upsides I remember were automatic indentation, output files saved while running the process, and a clean slate of settings each time I re-ran the script. ESS for SAS was a higher

[ESS] ESS[SAS]: experience, fixes, and starting questions

2024-01-29 Thread Sparapani, Rodney via ESS-help
Hi Federico: iESS[SAS] goes way back to the beginning of ESS. At that time, interactive SAS was thought to be a good idea. However, batch SAS was quickly adopted as a more prudent approach given that there was comparatively little interactive support relative to R. And the reason the F-keys

Re: [R] print data.frame with a list column

2024-01-29 Thread Ivan Krylov via R-help
On Mon, 29 Jan 2024 14:19:21 +0200 Micha Silver wrote: > Is there some option to force printing the full list? > df <- data.frame("name" = "A", "bands" = I(list(1:20))) format.AsIs is responsible for printing columns produced using I(). It accepts a "width" argument: format(x, width = ) #

[R] print data.frame with a list column

2024-01-29 Thread Micha Silver
I have a data.frame with one column as a list. When printing (or using knitr::kable) the list gets truncated. Is there some option to force printing the full list? MWE: df <- data.frame("name" = "A", "bands" = I(list(1:20))) > print(df) name bands 1 A 1, 2, 3, I'd like to avoid the

[R] 2SLS with Fixed Effects and Control Variables

2024-01-29 Thread Kelis Wong
Dear John Fox, Christian Kleiber, and Achim Zeileis, I am attempting to run various independent variable parameters to assess their suitability. Unfortunately, I hit a snag and couldn't get the tests to run properly. When I used ivreg, I got an error message saying: "Error in eval(predvars, data,

Re: [R] DescTools::Quantile

2024-01-29 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
It looks like a homework assignment. It also looks like you didn't read the documentation carefully enough. The 'len.out' argument in seq is solely for specifying the length of a sequence. The 'quantile' function omputes the empirical quantile of raw data in the vector 'x' at cumulative

Re: [R] 2SLS with Fixed Effects and Control Variables

2024-01-28 Thread Achim Zeileis
Kelis, thanks for your interest. It's hard to say what exactly goes wrong based on the information you provide. However, I would recommend that you first process the data: - Store all variables as the appropriate types (numeric, factor, etc.) in the data frame. Then you don't have to put

[ESS] ESS[SAS]: experience, fixes, and starting questions

2024-01-27 Thread Frederico Muñoz via ESS-help
Hello, I've used ESS with R before, but I just started with using it for SAS and I had an initial experience that I'm unsure is due to my lack of knowledge (and lack of proper understanding of the documentation) or more related with the status of the SAS support in ESS. I'm using Emacs 30.0.6,

Re: [R] DescTools::Quantile

2024-01-27 Thread Duncan Murdoch
On 26/01/2024 10:38 a.m., Michael Meyer via R-help wrote: Greetings, I am having a problem with DescTools::Quantile (a function computing quantiles from weighted samples): # these sum to one probWeights = c( 0.0043, 0.0062, 0.0087, 0.0119, 0.0157, 0.0204, 0.0257, 0.0315, 0.0378,

[R] DescTools::Quantile

2024-01-26 Thread Michael Meyer via R-help
Greetings, I am having a problem with DescTools::Quantile (a function computing quantiles from weighted samples): # these sum to one probWeights = c( 0.0043, 0.0062, 0.0087, 0.0119, 0.0157, 0.0204, 0.0257, 0.0315, 0.0378, 0.0441, 0.0501, 0.0556, 0.06, 0.0632, 0.0648, 0.0648, 0.0632,

Re: [R] Use of geometric mean .. in good data analysis

2024-01-26 Thread Simon, Stephen D.
Sorry to prolong a thread on something that is clearly off topic, but when Michael Meyer wrote >by using the geometric mean all asymptotic results no longer apply. that is flat our wrong. It's true that the geometric mean converges to something different that E[X], but it does indeed have an

[R] Quantiles of sums of independent discrete random variables

2024-01-25 Thread Michael Meyer via R-help
Greetings, Minimal reproducible example as requested by the technical expert Jeff Newmiller: library(bayesmeta) # density of $(1/10)*\sum_{j=1}{10}N(j,0.01$ # (convex sum of normal distributions) # f <- Vectorize(function(s) sum(vapply(1:10,    FUN = function(j) dnorm(s,mean=j,sd=0.01)/10,

[R] Use of geometric mean .. in good data analysis

2024-01-25 Thread Michael Meyer via R-help
By the Strong Law of Large Numbers applied to log(X) the geometric mean of X_1,...,X_n > 0 and IID like X converges toexp(E[log(X)]] which, by Jensen's inequality, is always  <= E[X] and is strictly less than E[X] except in trivial extreme cases. In short: by using the geometric mean all

Re: [R] Use of geometric mean for geochemical concentrations [RESOLVED]

2024-01-24 Thread Rich Shepard
On Mon, 22 Jan 2024, Rich Shepard wrote: As an aquatic ecologist I see regulators apply the geometric mean to geochemical concentrations rather than using the arithmetic mean. I want to know whether the geometric mean of a set of chemical concentrations (e.g., in mg/L) is an appropriate

Re: [R] Use of geometric mean .. in good data analysis

2024-01-23 Thread John via R-help
I've advised people consulting me that if their data is loaded with zeros, while they are absolutely certain that something should be where the zeros are, then they either need a better measuring tool, or to carefully document the results of limits on detectability and then note what fraction

[R] Quantiles of sums of independent discrete random variables

2024-01-23 Thread Michael Meyer via R-help
Greetings, I have the following  Problem: Given k (=10) discrete independent random variables X_i with n_i (= 5 to 20) values each,compute quantiles of the distribution of the sum X = X_1+...+X_k. Here X has n=n_1 x n_2 ... n_k distinct values which is too large to list them all together with

Re: [R] Use of geometric mean .. in good data analysis

2024-01-22 Thread Jeff Newmiller via R-help
Still OT... but here is my own (I think previously mentioned here) rant on people thrashing about with log transformation and an all-too-common kludge to deal with zeros mixed among small numbers... https://gist.github.com/jdnewmil/99301a88de702ad2fcbaef33326b08b4 OP perhaps posting a link

Re: [R] Use of geometric mean .. in good data analysis

2024-01-22 Thread Bert Gunter
In the spirit of Martin's comments, it is perhaps worthwhile to note one of John Tukey's (who I actually knew) pertinent quotes: "The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.

Re: [R] Use of geometric mean .. in good data analysis

2024-01-22 Thread Bert Gunter
Ah LOD's, typically LLOD's ("lower limits of detection"). Disclaimer: I am *NOT* in any sense an expert on such matters. What follows are just some comments based on my personal experience. Please filter accordingly. Also, while I kept it on list as Martin suggested it might be useful to do

[ESS] FW: [GNU ELPA] ESS version 24.1.0

2024-01-22 Thread Sparapani, Rodney via ESS-help
Dear ESS users, I�m happy to report that we now have a new release. The first since 2018. It is available on github at https://github.com/emacs-ess/ESS and ELPA (see below). Although an official release, in many ways this is/was an experiment. I had never done a release before and I really

Re: [R] Use of geometric mean .. in good data analysis

2024-01-22 Thread John Fox
Dear Martin, Helpful general advice, although it's perhaps worth mentioning that the geometric mean, defined e.g. naively as prod(x)^(1/length(x)), is necessarily 0 if there are any 0 values in x. That is, the geometric mean "works" in this case but isn't really informative. Best, John --

Re: [R] Use of geometric mean .. in good data analysis

2024-01-22 Thread Rich Shepard
On Mon, 22 Jan 2024, Martin Maechler wrote: I think it is a good question, not really only about geo-chemistry, but about statistics in applied sciences (and engineering for that matter). John W Tukey (and several other of the grands of the time) had the log transform among the "First aid

Re: [R] Use of geometric mean .. in good data analysis

2024-01-22 Thread Martin Maechler
> Rich Shepard > on Mon, 22 Jan 2024 07:45:31 -0800 (PST) writes: > A statistical question, not specific to R. I'm asking for > a pointer for a source of definitive descriptions of what > types of data are best summarized by the arithmetic, > geometric, and harmonic

Re: [R] Use of geometric mean for geochemical concentrations

2024-01-22 Thread Rich Shepard
On Mon, 22 Jan 2024, Ben Bolker wrote: I think https://stats.stackexchange.com would be best: r-sig-ecology is pretty quiet these days Okay, Ben. Thanks, Rich __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] Use of geometric mean for geochemical concentrations

2024-01-22 Thread Ben Bolker
I think https://stats.stackexchange.com would be best: r-sig-ecology is pretty quiet these days On 2024-01-22 11:05 a.m., Rich Shepard wrote: On Mon, 22 Jan 2024, Bert Gunter wrote: better posted on r-sig-ecology? -- or maybe even stack exchange? Bert, Okay. Regards, Rich

Re: [R] Use of geometric mean for geochemical concentrations

2024-01-22 Thread Rich Shepard
On Mon, 22 Jan 2024, Bert Gunter wrote: better posted on r-sig-ecology? -- or maybe even stack exchange? Bert, Okay. Regards, Rich __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Use of geometric mean for geochemical concentrations

2024-01-22 Thread Bert Gunter
better posted on r-sig-ecology? -- or maybe even stack exchange? Cheers, Bert On Mon, Jan 22, 2024 at 7:45 AM Rich Shepard wrote: > A statistical question, not specific to R. > > I'm asking for a pointer for a source of definitive descriptions of what > types of data are best summarized by the

[R] Use of geometric mean for geochemical concentrations

2024-01-22 Thread Rich Shepard
A statistical question, not specific to R. I'm asking for a pointer for a source of definitive descriptions of what types of data are best summarized by the arithmetic, geometric, and harmonic means. As an aquatic ecologist I see regulators apply the geometric mean to geochemical concentrations

[R] [R-pkgs] hydroGOF back on CRAN (v0.5-4 released)

2024-01-22 Thread Mauricio Zambrano-Bigiarini
Dear all, After being archived on CRAN on 2023-10-16 , hydroGOF is finally back on CRAN since January 21th: https://cran.r-project.org/package=hydroGOF. This new version 0.5-4 includes: *) the following new functions: -) KGElf (García et al., 2017), -) sKGE (Fowler et al., 2018),

[R] [R-pkgs] hydroTSM back on CRAN (v0.7-0 released)

2024-01-22 Thread Mauricio Zambrano-Bigiarini
Dear all, After being archived on CRAN on 2023-10-1, hydroTSM is finally back on CRAN since January 18th: https://cran.r-project.org/package=hydroTSM. This new version 0.7-0 has several new functions, improvements, bugfixes, and a new dataset, mostly devoted to work with sub-daily and sub-hourly

Re: [R] Is there any design based two proportions z test?

2024-01-18 Thread John Fox
Dear Md Kamruzzaman, I've copied this response to the r-help list, where you originally asked your question. That way, other people can follow the conversation, if they're interested and there will be a record of the solution. Please keep r-help in the loop See below: On 2024-01-17 9:47

Re: [R] Is there any design based two proportions z test?

2024-01-17 Thread Anthony Damico
hi, this guide to analyzing changes in prevalence rates over time with complex survey data might also help? thanks http://asdfree.com/trend-analysis-of-complex-survey-data.html On Wed, Jan 17, 2024, 9:15 AM John Fox wrote: > Dear Md Kamruzzaman, > > To answer your second question first, you

Re: [R] Is there any design based two proportions z test?

2024-01-17 Thread John Fox
Dear Md Kamruzzaman, To answer your second question first, you could just use the svychisq() function. The difference-of-proportion test is equivalent to a chisquare test for the 2-by-2 table. You don't say how you computed the confidence intervals for the two separate proportions, but if

[R] Is there any design based two proportions z test?

2024-01-16 Thread Md. Kamruzzaman
Hello Everyone, I was analysing big survey data using survey packages on RStudio. Survey package allows survey data analysis with the design effect.The survey package included functions for all other statistical analysis except two-proportion z tests. I was trying to calculate the difference in

Re: [R] different results between cor and ccf

2024-01-16 Thread Berwin A Turlach
G'day Patrick, On Tue, 16 Jan 2024 09:19:40 +0100 Patrick Giraudoux wrote: [...] > So far so good, but when I lag one of the series, I cannot find the > same correlation as with ccf > > > cor(x[1:(length(x)-1)],y[2:length(y)]) [1] -0.7903428 > > ... where I expect -0.668 based on ccf > >

[R] different results between cor and ccf

2024-01-16 Thread Patrick Giraudoux
Dear listers, I am working on a time series but find that for a given non-zero time lag correlations obtained by ccf and cor are different. x <- c(0.85472102802704641, 1.6008990694641689, 2.5019632258894835, 2.514654801253164, 3.3359198688206368, 3.5401357138398208, 2.6304117871193538,

[R] Plotting extrapolation with R like AUTOBOX does

2024-01-14 Thread varin sacha via R-help
Dear R-experts, I write to you to know if somebody is aware of a R package (or function) able to plot graphs for extrapolation. I need to be clear on what extrapolation really is to me. It is when we use the model for X variables outside the range of X variables that were used to construct

Re: [R] Fwd: Strange results : bootrstrp CIs

2024-01-14 Thread varin sacha via R-help
Dear R-experts, I really thank you all for your responses. Best, Le dimanche 14 janvier 2024 à 10:22:12 UTC+1, Duncan Murdoch a écrit : On 13/01/2024 8:58 p.m., Rolf Turner wrote: > On Sat, 13 Jan 2024 17:59:16 -0500 > Duncan Murdoch wrote: > > > >> My guess is that one of the

Re: [R] Fwd: Strange results : bootrstrp CIs

2024-01-14 Thread Duncan Murdoch
On 13/01/2024 8:58 p.m., Rolf Turner wrote: On Sat, 13 Jan 2024 17:59:16 -0500 Duncan Murdoch wrote: My guess is that one of the bootstrap samples had a different selection of countries, so factor(Country) had different levels, and that would really mess things up. You'll need to decide

Re: [R] Strange results : bootrstrp CIs

2024-01-13 Thread Rolf Turner
On Sat, 13 Jan 2024 16:54:01 -0800 Bert Gunter wrote: > Well, this would seem to work: > > e <- data.frame(Score = Score > , Country = factor(Country) > , Time = Time) > > ncountry <- nlevels(e$Country) > func= function(dat,idx) { >

Re: [R] Fwd: Strange results : bootrstrp CIs

2024-01-13 Thread Rolf Turner
On Sat, 13 Jan 2024 17:59:16 -0500 Duncan Murdoch wrote: > My guess is that one of the bootstrap samples had a different > selection of countries, so factor(Country) had different levels, and > that would really mess things up. > > You'll need to decide how to handle that: If you are trying

Re: [R] Strange results : bootrstrp CIs

2024-01-13 Thread Bert Gunter
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 =

[R] Fwd: Strange results : bootrstrp CIs

2024-01-13 Thread Duncan Murdoch
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 To: varin sacha You can debug things like this by setting options(error = recover). That will drop into the

Re: [R] Strange results : bootrstrp CIs

2024-01-13 Thread Ben Bolker
It took me a little while to figure this out, but: the problem is that if your resampling leaves out any countries (which is very likely), your model applied to the bootstrapped data will have fewer coefficients than your original model. I tried this: cc <- unique(e$Country) func <-

Re: [R] Strange results : bootrstrp CIs

2024-01-13 Thread varin sacha via R-help
Dear Duncan, Dear Ivan, I really thank you a lot for your response. So, if I correctly understand your answers the problem is coming from this line: coef(lm(Score~ Time + factor(Country)),data=data[idx,]) This line should be: coef(lm(Score~ Time + factor(Country),data=data[idx,])) If yes, now

Re: [R] Strange results : bootrstrp CIs

2024-01-13 Thread Ivan Krylov via R-help
В Sat, 13 Jan 2024 20:33:47 + (UTC) varin sacha via R-help пишет: > coef(lm(Score~ Time + factor(Country)),data=data[idx,]) Wrong place for the data=... argument. You meant to give it to lm(...), but in the end it went to coef(...). Without the data=... argument, the formula passed to lm()

Re: [R] Strange results : bootrstrp CIs

2024-01-13 Thread Duncan Murdoch
On 13/01/2024 3:33 p.m., varin sacha via R-help wrote: Score=c(345,564,467,675,432,346,476,512,567,543,234,435,654,411,356,658,432,345,432,345, 345,456,543,501) Country=c("Italy", "Italy", "Italy", "Turkey", "Turkey", "Turkey", "USA", "USA", "USA", "Korea", "Korea", "Korea", "Portugal",

[R] Strange results : bootrstrp CIs

2024-01-13 Thread varin sacha via R-help
Dear R-experts, Here below, my R code working BUT I get a strange result I was not expecting! Indeed, the 95% percentile bootstrap CIs is (-54.81, -54.81 ). Is anything going wrong? Best, ##

Re: [R] arrow on contour line

2024-01-12 Thread John Kane
Something like this shodld worx. You will need to fiddle around with the actual co-ordinates etc. I just stuck an arrow in what seemed like a handy place On Wed, 10 Jan 2024 at 19:13, Deepankar Basu wrote: > Hello, > > I am drawing contour lines for a function of 2 variables at one level of >

Re: [R-es] nueva consulta R versión 32 bit ultima version

2024-01-11 Thread LeugimSan via R-help-es
Hola Emiliano. Desde la versión 4.2.0 de R ya no se proporcionan compilaciones de 32 bits. Puedes comprobarlo en el apartado 2.27 de las FAQ https://cran.r-project.org/bin/windows/base/rw-FAQ.R-4.3.2.html#Should-I-run-32_002dbit-or-64_002dbit-R_003f Un saludo, Miguel.

[R-es] nueva consulta R versión 32 bit ultima version

2024-01-11 Thread emiliano di iorio
La ultima versi�n de R desde p�gina oficial, Download R-4.3.2 for Windows (79 megabytes, 64 bit), no tiene la opci�n de 32 bit. Es as� o hay otro modo de obtener la descarga con ambas versiones de bit? Gracias Enviado desde

Re: [R] arrow on contour line

2024-01-11 Thread Lennart Kasserra
Hi, If I understand your intentions correctly, the simplest way would be to manually insert arrows using `geom_segment()` with the `arrow` argument: ``` ggplot(data = d1, aes(x=X1,y=X2,z=Z))+   stat_contour(breaks = c(2)) +   stat_contour(data=d2, aes(x=X1,y=X2,z=Z), breaks=c(6)) +  

Re: [R] arrow on contour line

2024-01-11 Thread Ivan Krylov via R-help
В Wed, 10 Jan 2024 19:13:19 -0500 Deepankar Basu пишет: > 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? Can you use the

Re: [R] arrow on contour line

2024-01-11 Thread Rolf Turner
On Wed, 10 Jan 2024 19:13:19 -0500 Deepankar Basu wrote: > 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

[R] arrow on contour line

2024-01-10 Thread Deepankar Basu
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

Re: [R] Truncated plots

2024-01-09 Thread avi.e.gross
Nick, obviously figuring out the problem is best but you may want to deal with the symptom. RSTUDIO lets you adjust the sizes of the various windows and enlarging the window (lower right normally) where the graph is shown may be a first attempt if the problem is display space. And note RSTUDIO

Re: [R] Truncated plots

2024-01-09 Thread John Kane
If it looks to be a very specific RStudio/ggplot2 problem then https://community.rstudio.com is probably the place to ask. What happens if she does as Duncan suggests or if she exports the file? Come to think of it, is she getting the same result if she clicks on Zoom in the plot window? The

Re: [R] Truncated plots

2024-01-09 Thread Ivan Krylov via R-help
В Tue, 9 Jan 2024 16:42:32 + Nick Wray пишет: > she has a problem with R studio on her laptop Does the problem happen with plain R, without Rstudio? What's the student's sessionInfo()? > I have a screenshot which could email if anyone needs to see what it > looks like. I think that PNG

Re: [R] Truncated plots

2024-01-09 Thread Ebert,Timothy Aaron
It would help to have reproducible code. Use dummy data for confidentiality (if you care about that). My guess is that you set margins somewhere and never returned them to a default value. The first thing I would try is to open a new window in RStudio, copy the smallest piece of code that will

Re: [R] Truncated plots

2024-01-09 Thread Duncan Murdoch
On 09/01/2024 11:42 a.m., Nick Wray wrote: Hello As a postgrad I have been helping an undergraduate student with R coding but she has a problem with R studio on her laptop which I can't fix - basically when she runs a plot it appears without a y axis label with the black line plot frame hard

[R] Truncated plots

2024-01-09 Thread Nick Wray
Hello As a postgrad I have been helping an undergraduate student with R coding but she has a problem with R studio on her laptop which I can't fix - basically when she runs a plot it appears without a y axis label with the black line plot frame hard against the plot window and the bottom of the

Re: [R] how to specify uncorrelated random effects in nlme::lme()

2024-01-09 Thread Viechtbauer, Wolfgang (NP)
Dear Zhen, You can use this with pdDiag(). An example: library(nlme) res <- lme(distance ~ age*Sex, random = list(Subject = pdDiag(~ age)), data=Orthodont) summary(res) Best, Wolfgang > -Original Message- > From: R-help On Behalf Of ?? > Sent: Monday, January 8, 2024 12:43 > To:

[R] how to specify uncorrelated random effects in nlme::lme()

2024-01-09 Thread 王震
Dear professor, I'm using package nlme, but I can't find a way to specify two uncorrelated random effects. For example, a random intercept and a random slope. In package lme4, we can specifyx + (x ll g) to realize, but how in nlme? Thanks! Zhen Wang

Re: [R-es] conectar R con base de datos Access

2024-01-08 Thread jose luis via R-help-es
Asi es. Yo el truco que hago mientras no conozca otra herramienta es el siguiente: reinicio R en versión 32. Importo la base de datos como dijo Francisco. Entonces guardo la sesión (Save Workspace As...). Cierro y vuelvo abrir R en modo 64 y cargo la sesión anterior (Load Workspace) y ya puedo

Re: [R-es] conectar R con base de datos Access

2024-01-08 Thread Javier Marcuzzi
Estimado Emiliano De Iorio ¿Que posibilidades hay de tomar access y pasarlo a otro base de datos, o sqlite para tener todo en un archivo? Si puede migrar los datos ganaría en una cantidad de herramientas disponibles en R para trabajar con los datos. Javier Rubén Marcuzzi > El 7 ene 2024,

Re: [R] Obtaining a value of pie in a zero inflated model (fm-zinb2)

2024-01-07 Thread Ben Bolker
A little more. As Christopher Ryan points out, as long as the zero-inflation model is non-trivial (i.e. more complex than a single intercept for the whole population), there's a pi(i) for every observation i (you could certainly average the pi(i) values if you wanted, or compute pi for

Re: [R-es] conectar R con base de datos Access

2024-01-07 Thread Francisco Rodríguez
Hola buenas tardes, si nada ha cambiado, con R 64 bits no te puedes conectar a access. Para hacerlo te tienes que ir a 32 bits, Te mando un ejemplo de cómo podría hacerse, una vez que le digas a RStudio que tome la versión 32bits (entiendo que es una chapuza, pero por alguna razón creo que no

[R-es] conectar R con base de datos Access

2024-01-07 Thread emiliano di iorio
Hola me interesar�a realizar esa conexi�n, para poder manipular las tablas Access desde R. Alguien sabe el procedimiento y que paquetes debo bajar y si hay alguna otra especificaci�n t�cnica respecto a la configuraci�n del Windows en 64 bits? Saludos Enviado desde

Re: [ESS] Following up, success! [was RE: [R-win] Difficulty installing R packages under Windows 11 / Cygwin]

2024-01-07 Thread Robert Lerche via ESS-help
> Just to be sure: So all these changes in your patch are guaranteed to *not* > change the path / file-paths anywhere *unless* our emacs & ESS run on an > Windows Cygwin platform? That is my intention. Here is a slight "belt and suspenders" update, adding a specific test for Cygwin Emacs.

Re: [R] Help request: Parsing docx files for key words and appending to a spreadsheet

2024-01-06 Thread Andy
Hi Tim This is brilliant - thank you!! I've had to tweak the basePath line a bit (I am on a Linux machine), but having done that, the code works as intended. This is a truly helpful contribution that gives me ideas about how to work it through for the missing fields, which is one of the

[R] Amelia. Imputation of time-series data

2024-01-05 Thread Sorkin, John
Colleagues, I have started working with Amelia, with the aim of imputing missing data for time-series data. Although I have succeeded in getting Amelia to perform the imputation, I have not found any documentation describing how Amelia imputes time-series data. I have read the basic Amelia

Re: [ESS] Following up, success! [was RE: [R-win] Difficulty installing R packages under Windows 11 / Cygwin]

2024-01-05 Thread Martin Maechler via ESS-help
> Robert Lerche via ESS-help > on Wed, 3 Jan 2024 22:58:00 + writes: > Yes and thanks for responding. That is I think exactly what's needed and I have taken a shot at implementing it. [I'm glad my previous attached patch got filtered, I was a bit careless.] Here's a

Re: [R] Obtaining a value of pie in a zero inflated model (fm-zinb2)

2024-01-04 Thread Christopher W. Ryan via R-help
Are you referring to the zeroinfl() function in the countreg package? If so, I think predict(fm_zinb2, type = "zero", newdata = some.new.data) will give you pi for each combination of covariate values that you provide in some.new.data where pi is the probability to observe a zero from the point

Re: [R] Help request: Parsing docx files for key words and appending to a spreadsheet

2024-01-04 Thread Andy
Hi folks Thanks for your help and suggestions - very much appreciated. I now have some working code, using this file I uploaded for public access: https://docs.google.com/document/d/1QwuaWZk6tYlWQXJ3WLczxC8Cda6zVERk/edit?usp=sharing=103065135255080058813=true=true The small code segment

[R] Obtaining a value of pie in a zero inflated model (fm-zinb2)

2024-01-04 Thread Sorkin, John
I am running a zero inflated regression using the zeroinfl function similar to the model below: fm_zinb2 <- zeroinfl(art ~ . | ., data = bioChemists, dist = "poisson") summary(fm_zinb2) I have three questions: 1) How can I obtain a value for the parameter pie, which is the fraction of the

Re: [ESS] Following up, success! [was RE: [R-win] Difficulty installing R packages under Windows 11 / Cygwin]

2024-01-03 Thread Robert Lerche via ESS-help
Yes and thanks for responding. That is I think exactly what's needed and I have taken a shot at implementing it. [I'm glad my previous attached patch got filtered, I was a bit careless.] Here's a summary of what I've done: ess-custom.el: extract prefix using cygpath, set to nil if error

Re: [ESS] Following up, success! [was RE: [R-win] Difficulty installing R packages under Windows 11 / Cygwin]

2024-01-03 Thread Sparapani, Rodney via ESS-help
Hi Robert: Looking this over. The issue appears to be that you need a prefix. It has been a long time since I used Cygwin. But I assume the prefix is something like �c:� or �/cygwin/c�. In other words, the root is NOT �/�; rather something like $PREFIX/ Is that the issue? I�m trying to think

Re: [R] Help request: Parsing docx files for key words and appending to a spreadsheet

2024-01-03 Thread Dr Eberhard Lisse
If you do something like this for i in $(pandoc --list-output-formats); do pandoc -f docx -t $i -o test.$i Now\ they\ want\ us\ to\ charge\ our\ electric\ cars\ from\ litter\ bins.docx; done you get approximately 65 formats, from which you can pick one

<    5   6   7   8   9   10   11   12   13   14   >