Re: [R] unexpected 'else' in " else" (Ebert,Timothy Aaron)

2022-10-24 Thread Bert Gunter
"...but 'same length and attributes (including dimensions and ‘"class"’) as ‘test’' looks wrong. The output seems to be `logical` or something related to the classes of `yes` & `no`." The documentation in fact says: "A vector of the same length and attributes (including dimensions and "class") as

Re: [R] cannot print a list with cat

2022-10-24 Thread Bert Gunter
"collapse the lines" means ?? If you mean that you want to control the precision (# of decimals places to show) then that is exactly what sprintf does. ?sprintf tells you how. If you mean something else, please specify more clearly -- or await a reply from someone with greater insight than I. --

Re: [R] getting data from a "vertical" table into a "2-dimensional" grid

2022-10-21 Thread Bert Gunter
Well, if you know the column subscripts you need, just forget about the names! I would just write a (one-liner) function to do it for any data frame: myfun <- function(dat)tapply(dat[,3], dat[,1:2], sum) ## dat[,1:2] is a list because it's a data frame and all data frames are lists

Re: [R] getting data from a "vertical" table into a "2-dimensional" grid

2022-10-21 Thread Bert Gunter
"As my end result, I want a matrix or data frame, with one row for each year, and one column for each category." If I understand you correctly, no reshaping gymnastics are needed -- just use ?tapply: set.seed(1) do <- data.frame(year = rep(1990:1999, length = 50), category = sample(1:5, size =

Re: [R] Adding page numbers to existing PDFs

2022-10-21 Thread Bert Gunter
Have you done a web search on "R packages to edit pdf files" or similar? I got what looked like relevant hits with it. Bert On Fri, Oct 21, 2022 at 10:49 AM Dennis Fisher wrote: > R 4.2.1 > OS X > > Colleagues > > I have multipage PDF files that were created in R — the files do NOT have > page

Re: [R] how to enlarge the legend

2022-10-09 Thread Bert Gunter
Nope. Sorry. Ignore my comment. box.lwd changes the width of the box line, bot the width of the box. -- Bert On Sun, Oct 9, 2022 at 8:08 AM Bert Gunter wrote: > Did you use the 'box.lwd' argument to set the width of the box? If so, why > does this not work for you? If not, set it to a

Re: [R] how to enlarge the legend

2022-10-09 Thread Bert Gunter
Did you use the 'box.lwd' argument to set the width of the box? If so, why does this not work for you? If not, set it to a bigger value. Cheers, Bert On Sun, Oct 9, 2022 at 7:55 AM Jinsong Zhao wrote: > Hi there, > > in the following code, I'd like to enlarge the filled box but not the >

Re: [R] Ids with matching number combinations?

2022-10-07 Thread Bert Gunter
Well, for a start, you might give us a reproducible example that actually runs -- yours doesn't. Did you check? You seem to b.e missing a final ")"(Also, you do not need to quote the column names in data.frame(), though it works fine also if you do). Also note that in df, your id column has

Re: [R] Fixed effect model: different estimation approaches with R return different results

2022-10-06 Thread Bert Gunter
You could get lucky here, but strictly speaking, this list is about R programming and statistical issues are typically off topic Someone might respond privately, though. Cheers, Bert On Thu, Oct 6, 2022 at 4:24 AM Valerio Leone Sciabolazza < sciabola...@gmail.com> wrote: > Good morning, > I am

Re: [R] automatic convert list to dataframe

2022-10-03 Thread Bert Gunter
... But why not dispense with multiple files, name juggling, and environments by simply putting everything in one list of lists (lists are recursive structures!): all_files <- lapply(filenames, function(nm)import_list(nm,...)) names(all_files) <- filenames ## Note: the ... are any optional

Re: [R] Robust standard error

2022-10-02 Thread Bert Gunter
You may get a helpful response here, but generally speaking, this list is about R **programming**, and statistical issues/tutorials are off topic. You might try https://stackoverflow.com/questions/tagged/statistics if you don't get adequate help here. -- Bert On Sun, Oct 2, 2022 at 6:42 AM

Re: [R] Reading very large text files into R

2022-09-29 Thread Bert Gunter
I had no trouble reading your text snippet with read.csv(text = "... your text... ") There were 15 columns. The last column was all empty except for the row containing the "B". So there seems to be some confusion here. -- Bert On Thu, Sep 29, 2022 at 6:54 AM Nick Wray wrote: > Hello I

Re: [R] Question about Line Ending Choice

2022-09-27 Thread Bert Gunter
Did you not see the "eol" parameter in write.table ? Bert On Tue, Sep 27, 2022 at 8:23 AM Stephen H. Dawson, DSL via R-help < r-help@r-project.org> wrote: > Hi All, > > > I am writing with a question about choosing the line ending aspect of a > file, please. > > I use write.csv and write.table

Re: [R] apply to row and column of matrix

2022-09-26 Thread Bert Gunter
from ?apply: "If each call to FUN returns a vector of length n, and simplify is TRUE, then apply returns an array of dimension c(n, dim(X)[MARGIN]) ." For margin = 1 (cumsum over rows), each call to cumsum return a vector of length 2. Hence the array returned will be of dimension c(2, c(5,2)[1])

Re: [R] Solve equality function with GA

2022-09-25 Thread Bert Gunter
... oops. Ignore my last sentence. Need more coffee... -- Bert On Sun, Sep 25, 2022 at 7:45 AM Bert Gunter wrote: > ... and so you need f(x) = abs(x^2 - 25), > though I have no idea if GA handles non-continuously differentiable > functions. > > -- Bert > > On Sun, Sep 25,

Re: [R] Solve equality function with GA

2022-09-25 Thread Bert Gunter
nction is at x=0. > > > > On Sun, Sep 25, 2022 at 4:52 AM Bert Gunter > wrote: > >> We aren't supposed to do homework on this list. >> >> Bert Gunter >> >> On Sat, Sep 24, 2022 at 5:29 PM Barry King via R-help < >> r-help@r-project.org> &g

Re: [R] Solve equality function with GA

2022-09-24 Thread Bert Gunter
We aren't supposed to do homework on this list. Bert Gunter On Sat, Sep 24, 2022 at 5:29 PM Barry King via R-help wrote: > I am having difficulty solving for 5 in this coded snippet. Please help. > --- > library(GA) > > # Solve for x where x^2 = 25, not

Re: [R] How to set default encoding for sourced files

2022-09-21 Thread Bert Gunter
?options options(encoding = "utf-8") in a startup file or function should presumably do it. See ?Startup Bert On Wed, Sep 21, 2022 at 7:34 AM Andrew Hart via R-help wrote: > Hi there. I'm working with some utf-8 incoded csv files which gives me > data frames with utf-8 encoded headers. This

Re: [R] Mathematical working procedure of imputation methods (medianImpute, knnImpute, and bagImpute) in caret package R

2022-09-20 Thread Bert Gunter
R is open source. Look at the code and read it. Alternatively, look at references for all of this. e.g. on Wikipedia or via web search. We generally do not provide statistical instruction on this list. Bert On Tue, Sep 20, 2022 at 2:20 PM K Purna Prakash wrote: > Dear Sir/Madam, > Greetings!!!

Re: [R] getDividents() doesn't work

2022-09-20 Thread Bert Gunter
... and do note that a "warning" is not an "error." Often the correct result will still be obtained. -- Bert On Tue, Sep 20, 2022 at 9:48 AM Phil Smith via R-help wrote: > Hi R-Help People! > > I'm using the current version of R for Ubuntu: R version 4.2.1 > (2022-06-23) -- "Funny-Looking

Re: [R] Need help plotting

2022-09-20 Thread Bert Gunter
"Also, IU’s tech support told me yesterday that if I responded to a message that came as plain text, my response would go out as plain text. Is that true for this response, or is it in HTML?" Nope, HTML. You need to set your email client to send in plain text. Do an internet search on how to do

Re: [R] rename files in R

2022-09-19 Thread Bert Gunter
I haven't tracked what went before, but your syntax here is totally messed up: for (i in seq_len(nrow(total_name))) { with( total_name[i, ], { file.rename(total_name$orig, total_name$target) } ) } Also, you don't need looping because file.rename is already vectorized -- you

Re: [R] Need help plotting

2022-09-19 Thread Bert Gunter
See ?date-time and/or ?strptime for how to convert what I presume is character data in your datetime column to a POSIXct object. (you may first need to convert from a factor to character with as.character() ). Then follow Tim's prescription for ggplot or see ?axis.Date (especially the examples)

Re: [R] inadequacy in as.integer....

2022-09-11 Thread Bert Gunter
You seem to be confusing **what** is printed with *how* it is printed. > print(9) ## a numeric (not an integer, actually. That would be 9L) [1] 9 ## default print format > print(formatC(9, width =2, flag = "0")) ## format specification [1] "09" > print(formatC(9, width =2, flag = "0"), quote =

Re: [R] inconsistency in switch statements.....

2022-09-07 Thread Bert Gunter
Well, as it states on the Help page, which should always be the first place to look for, ummm, help: "If the value of EXPR is not a character string it is coerced to integer. Note that this also happens for factors, with a warning, as typically the character level is meant. If the integer is

Re: [R] stunning matrix multiplication differences Matrix vs. matrix

2022-09-03 Thread Bert Gunter
FAQ 7.31 ? Your matrices have about 9*10e8 entries after all. I know almost nothing about the Matrix package, but what does crossprod(RHS, Z) %*% RHS give for the two versions of Z = M and MM (assuming Matrix:::crossprod S4 method works here)? Hopefully a knowledgeable Matrix user will correct me

Re: [R] Correlate

2022-08-26 Thread Bert Gunter
if you perform > >>>> enough tests you find significant outcomes by chance alone. There is > >>>> great significance in the Redskins rule: > >>>> https://en.wikipedia.org/wiki/Redskins_Rule. > >>>> > >>>> A simple solution is

Re: [R] Fixing the size of R's Graphic Device

2022-08-25 Thread Bert Gunter
See ?Startup for various ways of automatically executing custom code at R start up. See ?setHook and ?.onLoad for how to run custom code when packages (like grDevices) are loaded. (But Jeff may be able to help you avoid even this if you respond to his queries). Cheers, Bert On Thu, Aug 25,

Re: [R] lattice question

2022-08-12 Thread Bert Gunter
I hit the wrong button, unfortunately, so others beside Naresh and Deepayan can safely ignore my "coda". On Fri, Aug 12, 2022 at 2:29 PM Bert Gunter wrote: > > As a private coda -- as it is unlikely to be of general interest -- > note that it is easy to do this without resort

Re: [R] Problem installing R 4.2 on Ubuntu 20-04

2022-07-25 Thread Bert Gunter
Better posted on R-sig-debian, I think. Cheers, Bert On Mon, Jul 25, 2022 at 7:44 AM Witold E Wolski wrote: > I am failing to get R 4 installed on Ubuntu. I am following the > instructions given here: > https://cran.r-project.org/bin/linux/ubuntu/ > > These are the errors I am getting: > >

Re: [R] How to reduce the (whitespace) gap between boxplots

2022-07-17 Thread Bert Gunter
spaces between boxplots are reduced but the main box (the container) > remains the same which still takes space. Can I reduce the size of the main > box (which contains all the boxplots) to take less space. > > > > On Sun, Jul 17, 2022 at 10:25 PM Bert Gunter wrote: >

Re: [R] the quantile function and problems.

2022-07-14 Thread Bert Gunter
Read ?quantile carefully, please (and any references therein that you may wish to consult). You are estimating a continuous function by a discrete finite step function, and as the Help page (and further references) explains, there are many ways to do this. Bert On Thu, Jul 14, 2022 at 2:33 PM

Re: [R] mice: selecting small subset of variables to impute from dataset with many variables (> 2500)

2022-07-14 Thread Bert Gunter
If I understand your query correctly, you can use negative indexing to omit variables. See ?'[' for details. > dat <- data.frame (a = 1:3, b = letters[1:3], c = 4:6, d = letters[5:7]) > dat a b c d 1 1 a 4 e 2 2 b 5 f 3 3 c 6 g > dat[,-c(2,4)] a c 1 1 4 2 2 5 3 3 6 Of course you have to know

Re: [R] Bug in packages.

2022-07-13 Thread Bert Gunter
https://www.r-project.org/bugs.html for info on bug reporting. Bert On Wed, Jul 13, 2022 at 1:49 PM Charles-Édouard Giguère wrote: > > Hello everyone, > Is there a mechanism to report a bug in someone package? I plan to email the > author, but I was wondering if there is an official way like

Re: [R] rmoving dates from an xts object...

2022-07-10 Thread Bert Gunter
Time to do your homework: https://rpubs.com/odenipinedo/manipulating-time-series-data-with-xts-and-zoo-in-R Bert On Sun, Jul 10, 2022, 6:42 PM akshay kulkarni wrote: > Dear members, > I have OHLC data of 500 stocks: OHLCData and > dates. These are of xts object. I

Re: [R] byte coding compiling.....

2022-07-06 Thread Bert Gunter
Unlikely See here: https://www.r-bloggers.com/2017/08/how-to-make-best-use-of-the-byte-compiler-in-r/ Byte code compilation should be automatic in both cases, as I understand it. Of course, I could be wrong due to special features of parallel programming, etc. A reprex might be helpful here.

Re: [R] Rstudio cannot be loaded

2022-06-19 Thread Bert Gunter
1. This would be better posted on the RStudio help site: https://community.rstudio.com/ (This is R-Help, not RStudio Help. RStudio and R are separate entities). 2. A standard recommendation, which may not be necessary though, would be to delete and reload the latest version of RStudio so it can

[R] Fwd: Query regarding R 'irr' package 'N.cohen.kappa'

2022-06-16 Thread Bert Gunter
-- Forwarded message - From: Bert Gunter Date: Thu, Jun 16, 2022 at 9:28 AM Subject: Re: [R] Query regarding R 'irr' package 'N.cohen.kappa' To: Kalaivani Mani Please read and follow the posting guide (linked below). No attachments came through, because most attachments

Re: [R] How do I "teach" R that columns 1, 2, and 3 are the Year-Month-Day

2022-06-15 Thread Bert Gunter
62.99 2022 6 11 89.37 ", header=TRUE ) dta$Dtm <- with( dta, as.Date( ISOdate( Yr, Mo, Dy ) ) ) with( dta, plot( Dtm, Fuel ) ) The ISOdate function returns a POSIXct which includes time-of-day. Analyses that don't need time can instead rely on the Date type to avoid issues with timez

Re: [R] Is there a package that can do Fuzzy name matching to standardize names in a single column

2022-06-15 Thread Bert Gunter
As these are English names and appear to be present always as **first ?? last** (you didn't specify but that's how your example shows it), maybe something like the following might be a start: 1. Use strsplit() to split the names into their constituent parts. 2. Find the last *meaningful* part in

Re: [R] Changing sign of columns and values

2022-06-11 Thread Bert Gunter
This is a plain text list. Your html post got mangled (see below). You are more likely to get a useful response if you follow the posting guide (linked below) and post in plain text. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking t

Re: [R] Circular Graph Recommendation Request

2022-05-28 Thread Bert Gunter
visualizations that work similarly. 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, May 28, 2022 at 8:39 AM Stephen H. Dawson, DSL via R-he

Re: [R] Use of ellipsis

2022-05-26 Thread Bert Gunter
before calling list() on it. Either way, the confusion of nse is avoided for the 'weights' argument. 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 Co

Re: [R] need to plot multiple spatial maps side-by-side in a single window using sf plot function in R

2022-05-14 Thread Bert Gunter
better posting this on r-sig-geo, https://stat.ethz.ch/mailman/listinfo/r-sig-geo , where expertise on this sort of thing is more likely to reside. Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkele

Re: [R] Issue when trying to install or load packages in RStudio

2022-05-13 Thread Bert Gunter
Sounds like an RStudio problem. 1. Try another repository. Try downloading packages manually from R. See ?install.packages, ?setRepositories . 2. Have you tried posting in RStudio's Help site: https://community.rstudio.com/ Bert Gunter "The trouble with having an open mind is that people

Re: [R] [External] result of mean(v1, v2, v3) of three real number not the same as sum(v1, v2, v3)/3

2022-05-12 Thread Bert Gunter
I believe you are still misunderstanding. Inline comments below. On Thu, May 12, 2022 at 2:02 PM Sorkin, John wrote: > > I thank Richard Heiberger, Marc Schwartz, Eric Berger, Ivan Krylov, and David > Stevens for answering my question regarding different results obtained from > mean(v1,v2,v3))

Re: [R] Filtering an Entire Dataset based on Several Conditions

2022-05-09 Thread Bert Gunter
3 -3.41 2 1.02 -1.12 -2.27 3 -1.92 -6.37 -6.44 4 -4.32 0.18 4.08 5 0.66 -5.82 -0.81 > d[abs(d) > 3] <- NA > d A B C 1 1.97 -1.23NA 2 1.02 -1.12 -2.27 3 -1.92NANA 4NA 0.18NA 5 0.66NA -0.81 Bert Gunter "The trouble with having an open

Re: [R] Gas Flux Equation

2022-05-03 Thread Bert Gunter
?HMR.fit appeared to contain (at least part of) what you asked for. Have you checked the package documentation, including the package vignette? Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breat

Re: [R] [External] Somewhat disconcerting behavior of seq.int()

2022-05-02 Thread Bert Gunter
before then. Bert Gunter On Mon, May 2, 2022 at 8:53 PM wrote: > > Something is very different about your system. On my Linux system I get > > > microbenchmark(l1 <- sieve1(1e5), times =50) > Unit: milliseconds > expr min lq mean median

Re: [R] flag records

2022-04-27 Thread Bert Gunter
... and also, the with() is unnecessary: flag <- by(DF3, fac, function(x)foo(x$text,x$day)) ## will do. Bert On Wed, Apr 27, 2022 at 11:06 AM Bert Gunter wrote: > OK. I may completely misunderstand. If you are happy with what Rui and/or > others have given you, **read n

Re: [R] Convert one rectangle into two rectangles

2022-04-26 Thread Bert Gunter
Sounds like homework. We try not to do homework here (if it is). See the posting guide linked below for details. 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 Coun

Re: [R] Confusing fori or ifelse result in matrix manipulation

2022-04-25 Thread Bert Gunter
Oh, I get it. The context was in choosing columns to set to 0 via a **predicate**. Sorry for the noise. Bert On Mon, Apr 25, 2022 at 7:39 AM Bert Gunter wrote: > > Yes, sorry. But it's with the logical cast it's still M[, c(FALSE, > TRUE, FALSE)] which is M[, 2], and so I still

Re: [R] Confusing fori or ifelse result in matrix manipulation

2022-04-25 Thread Bert Gunter
Yes, sorry. But it's with the logical cast it's still M[, c(FALSE, TRUE, FALSE)] which is M[, 2], and so I still don't get the point. 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

Re: [R] Confusing fori or ifelse result in matrix manipulation

2022-04-25 Thread Bert Gunter
x == 1 is the same as M[, x] so your expression is the same as M[, c(FALSE, TRUE, FALSE)] <- 0 which is the same as M[, 2] <- 0 So what is the point of all this, exactly? Bert On Mon, Apr 25, 2022 at 7:18 AM Ivan Calandra wrote: > > Hi Uwe, > > If I understood the problem completely and

Re: [R] QGIS and R

2022-04-23 Thread Bert Gunter
https://www.qgis.org/en/site/ (obviously) Probably better to ask on https://stat.ethz.ch/mailman/listinfo/r-sig-geo 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 "Bloo

Re: [R] Model To Simulate Dice Roll

2022-04-20 Thread Bert Gunter
your query, I am sorry: I am too lazy to go through your long explanation. If I have understood correctly, perhaps others will be kinder and provide you the missing details that I did not. Bert Gunter On Wed, Apr 20, 2022 at 9:02 PM Paul Bernal wrote: > > Dear friend Bert, > > Thank

Re: [R] Model To Simulate Dice Roll

2022-04-20 Thread Bert Gunter
mes to the column and then subsequently convert to a data frame if you like. 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 Wed, Apr 20, 2022

Re: [R] What are the pros and cons of the various R functions and methods for conducting least median of squares regression analysis?

2022-04-16 Thread Bert Gunter
No opinion (or expertise), but I think you may have missed the most important one, Roger Koenker's package, quantreg: https://CRAN.R-project.org/package=quantreg Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking t

Re: [R] Need help with netmeta package

2022-04-15 Thread Bert Gunter
While you *may* get a useful reply here, there is an r-sig-meta-analysis list to which this would be better posted: https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it.&quo

Re: [R] Sorted index of values in matrix

2022-04-15 Thread Bert Gunter
[4,]31 [5,]21 [6,] 1 1 Cheers, Bert Gunter On Fri, Apr 15, 2022 at 8:33 AM Jeff Newmiller wrote: > > Please stop posting in HTML format. > > I think your specified result coordinates are in (col,row) order, which is > not normal for R. The solution bel

Re: [R] Correct way to handle class

2022-04-14 Thread Bert Gunter
: "A class attribute is a character **vector** giving the names of the classes from which the object inherits. ..." So while what you did is correct, simply using: class(result) <- c("ECFOCF", class(result)) would suffice. The Help page above or tutorials will provide greater de

Re: [R] Symbol/String comparison in R

2022-04-13 Thread Bert Gunter
+ lots more). Incidentally, rseek.org and rdrr.io are another couple of good places to look for R documentation. 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&

Re: [R] [External] add equation and rsqared to plot

2022-04-08 Thread Bert Gunter
7890123456)) > text(.7, .4, quote(1234567890123456)) > > -Bill > > On Fri, Apr 8, 2022 at 9:49 AM Bert Gunter wrote: >> >> Yes, I also find it somewhat confusing. Perhaps this will help. I >> apologize beforehand if I have misunderstood and you already know all >> t

Re: [R] Calculation error found

2022-04-07 Thread Bert Gunter
Most attachments are stripped, as was yours. However, even without the info, the answer is very likely FAQ 7.31. Computer arithmetic. 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

Re: [R] Package nlme

2022-04-07 Thread Bert Gunter
tr(minitab) to get a useful answer (or I may simply not recognize an obvious issue in what you provided in your post). 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&qu

Re: [R] Plotting proportions

2022-04-03 Thread Bert Gunter
... and following up on Rui's reply, assuming that the default (in R, not RStudio) "m" is being used, I would assume that the aspect ratio in the RStudio device depends on the layout of your windows. Also, you might do better asking here, https://community.rstudio.com/ , than on this l

Re: [R] pcalg library : estimated DAG graph

2022-03-31 Thread Bert Gunter
://stat.ethz.ch/mailman/listinfo/r-sig-networks, as it says on its homepage that this SIG is specifically for those interested in "graph- related software" within R. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it

Re: [R] print only a few lines of an object

2022-03-23 Thread Bert Gunter
Well, that depends whether the object has/inherits from a class for which there is a suitable method for head/tail and for printing the result. So I think your before-thought applies :-) Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking t

Re: [R] functions st_transform and st_point

2022-03-23 Thread Bert Gunter
This is a good site for such searches: https://rdrr.io/ Searching on "st_point" there says it's in the 'geotidy' package on github. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Br

Re: [R] Help with using the huxreg() function

2022-03-22 Thread Bert Gunter
ages/ecosystems like the Tidyverse, that is probably a better place to look for help. (Also, please note that if you post *here*, this is a *plain text* list: HTML can get messed up by the server, as the PG says). Bert Gunter "The trouble with having an open mind is that people keep coming

Re: [R] Combining data.frames

2022-03-19 Thread Bert Gunter
Merge by the common keys/column names is the default. Te question is likely what to do with rows that don't match. That's determined by 'all' settings, which the OP may already have figured out. On Sat, Mar 19, 2022, 7:16 PM Tom Woolman wrote: > I'm trying hard to take tonight off and avoid

Re: [R] Exact 95% CI around the mean for LogNormal distribution

2022-03-16 Thread Bert Gunter
) still does. Your mileage may vary, of course. Cheers, 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 Wed, Mar 16, 2022 at 1:10 PM va

Re: [R] question

2022-03-15 Thread Bert Gunter
and someone here will be able to help you. But it is recommended in the posting guide (linked below) that a better option is to contact the package maintainer, which you can find via the: maintainer("flowr") command at the R console prompt. Hope this helps. Bert Gunter "The trouble with

Re: [R] how to rename variables by lopping off first 3 characters

2022-03-14 Thread Bert Gunter
(substring(nm, 1,3) == "i..", + substring(nm,4), + nm) > names(dat) <- nm > dat One Two ixx 1 1 a 5 2 2 b 6 3 3 c 7 Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into

Re: [R] Is there a Truth Table Generator in R?

2022-03-12 Thread Bert Gunter
... tt$truth <- tt$A & tt$B & tt$C to evaluate the outcome of expand.grid. or, as I said, tt$truth <- apply(tt,1, all) which works for any number of columns in tt. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things int

Re: [R] Is there a Truth Table Generator in R?

2022-03-12 Thread Bert Gunter
... Forgot to include for completeness: dat is as Jeff suggested: both <- c(TRUE, FALSE) dat <- expand.grid(both, both) Bert Gunter On Sat, Mar 12, 2022 at 10:33 AM Bert Gunter wrote: > > As Tim pointed out, your query is rather vague. A reprex would have > really helped here:

Re: [R] Is there a Truth Table Generator in R?

2022-03-12 Thread Bert Gunter
SE FALSE > tt(dat, function(x) !x[1] | x[2]) ## if-then Var1 Var2 Result 1 TRUE TRUE TRUE 2 FALSE TRUE TRUE 3 TRUE FALSE FALSE 4 FALSE FALSE TRUE Cheers, Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it."

Re: [R] Raster map in R

2022-03-08 Thread Bert Gunter
If Micha's reply doesn't satisfy, the r-sig-geo list would be a better place to post this. https://stat.ethz.ch/mailman/listinfo/r-sig-geo Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breat

Re: [R] linear mixed model using lmer

2022-03-04 Thread Bert Gunter
Do you really think a variance from a sample size of 2 makes any sense? 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 Fri, Mar 4, 2022 a

Re: [R] Searching for packages

2022-02-28 Thread Bert Gunter
Other places beside google to look for R info: https://rdrr.io/ https://www.rdocumentation.org/ https://rseek.org/ 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 Coun

Re: [R] tidying up

2022-02-27 Thread Bert Gunter
statement of proper use of these lists, alas often more honored in the breach than the observance. 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 stri

Re: [R] Question re predict.glm & predict.lm in STATS

2022-02-16 Thread Bert Gunter
in ?glm or even ?lm or in any tutorials on their use. Please spend the time to study these carefully. Trying to mimic examples you find, which seems to be what you are doing, is rarely sufficient. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking

Re: [R] [External] Convert a character string to variable names

2022-02-07 Thread Bert Gunter
in FUN(X[[i]], ...) : object 'mtcars$disp' not found > > > Like you say, as.name(x$something) is not the name of an object. > > Hope this helps, > > Rui Barradas > > Às 23:21 de 07/02/2022, Bert Gunter escreveu: > > I assume that the mtcars components were used o

Re: [R] generate distribution based on summary data and add random noise

2022-02-03 Thread Bert Gunter
n-principles/ > Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou > důvěrné a podléhají tomuto právně závaznému prohlášení o vyloučení > odpovědnosti: https://www.precheza.cz/01-dovetek/ | This email and any > documents attached to it may be confidential and are subj

Re: [R] Repeatability Analysis of Ordinal Data

2022-02-01 Thread Bert Gunter
(?maintainer) for such questions. 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 1, 2022 at 2:02 AM Sidoti, Salvatore wrote: >

Re: [R] progress of LDA algorithm...

2022-01-30 Thread Bert Gunter
I am not an expert, but I believe your extrapolation idea is unsound. Again, post on the HPC list to get expert feedback instead of trying to reinvent your own wheel. I will not respond further. Bert Gunter "The trouble with having an open mind is that people keep coming along and sti

Re: [R] progress of LDA algorithm...

2022-01-29 Thread Bert Gunter
performance computing considerations, you might want to post it on the R-Sig-HPC list, https://stat.ethz.ch/mailman/listinfo/r-sig-hpc 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 "Bloo

Re: [R] Row exclude

2022-01-29 Thread Bert Gunter
gt; Now identify character variables containing numbers and numeric variables > > containing characters: > > > > BadName <- which(grepl("[[:digit:]]", dat1$Name)) > > BadAge <- which(grepl("[[:alpha:]]", dat1$Age)) > > BadWeight <- which(grepl(

Re: [R] Row exclude

2022-01-28 Thread Bert Gunter
As character 'polluted' entries will cause a column to be read in (via read.table and relatives) as factor or character data, this sounds like a job for regular expressions. If you are not familiar with this subject, time to learn. And, yes, some heavy lifting will be required. See ?regexp for a

Re: [R] Simulate type I error

2022-01-26 Thread Bert Gunter
y choose "Plain text mode" in gmail as its default is html. 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 Wed, Jan 26, 2022 a

Re: [R] Linear

2022-01-26 Thread Bert Gunter
What does str(dat2) give? 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 Wed, Jan 26, 2022 at 7:37 AM Val wrote: > > Hi a

Re: [R] Issues regarding pass parameters

2022-01-19 Thread Bert Gunter
s own help resources at: https://community.rstudio.com/ This is where questions about the TidyVerse, Shiny, ggplot, etc. should be posted. 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 Count

Re: [R] NAs are removed

2022-01-14 Thread Bert Gunter
Unlikely. > 1/0 [1] Inf ## not NA Bert On Fri, Jan 14, 2022 at 12:41 PM Jim Lemon wrote: > Hi Neha, > You're using the argument "na.omit" in what function? My blind guess > is that there's a divide by zero shooting you from behind. > > Jim > > On Sat, Jan 15, 2022 at 6:32 AM Neha gupta >

Re: [R] how to find the table in R studio

2022-01-12 Thread Bert Gunter
list cannot serve as a tutorial service. We can help, as you know, but we expect that you will put in the effort required. As I said, there are a ton of (good) tutorials out there to choose from. Bert Gunter "The trouble with having an open mind is that people keep coming along and sti

Re: [R] Help with developing package DWLS

2022-01-11 Thread Bert Gunter
Andrew has already provided you a lot of help, but further posts should go to r-package-devel, which is a mailing list specifically set up to provide the sort of help you requested. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking t

Re: [R] ggtree node labels

2022-01-09 Thread Bert Gunter
intains its own help resources at: https://community.rstudio.com/ This is where questions about the TidyVerse, ggplot, etc. should be posted. 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 h

Re: [R] Percentile bootstrap for the median : error message

2022-01-08 Thread Bert Gunter
I see no error message. Bert Gunter On Sat, Jan 8, 2022 at 9:04 AM varin sacha via R-help wrote: > Dear R-experts, > > Here below my R code for the percentile bootstrap confidence intervals > with an error message. > Is there a way to make my R code work ? > Many th

Re: [R] Dependencies for building R

2022-01-06 Thread Bert Gunter
Ask on r-sig-fedora rather than here, no? On Thu, Jan 6, 2022, 8:18 PM Jim Lemon wrote: > Hi, > I'm facing the usual challenge of building the latest release of R on > a new install of Fedora 35 Linux. Is there a list of dependencies that > have to be installed (or even better, a package) to

Re: [R] Information function in CRM model

2022-01-06 Thread Bert Gunter
arily intended for questions and discussion about the R software. However, questions about statistical methodology are sometimes posted. If the question is well-asked and of interest to someone on the list, it may elicit an informative up-to-date answer." Bert Gunter "The trouble with

Re: [R] Connect R with Ensemble Rest API to fetch variations

2022-01-03 Thread Bert Gunter
Your query is completely off topic here. I suggest you try posting at: https://www.bioconductor.org/help/ instead. I also suggest that you read and follow their posting guide before doing so. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking t

<    1   2   3   4   5   6   7   8   9   10   >