Re: [R] mixture univariate distributions fit

2021-12-31 Thread Bert Gunter
Petr: Please feel free to ignore and not reply if you think the following questions are unhelpful. 1. Do you want to know the location of peaks (local modes) or the parameters of the/a mixture distribution? Peaks do not have to be located at the modes of the individual components of the mixture.

Re: [R] question about error message: "Aesthetics must be either length 1 or the same as the data (226): y and colour"

2021-12-30 Thread Bert Gunter
s 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 his "Bloom County" comic strip ) On Thu, Dec 30, 2021 at

Re: [R] mixture univariate distributions fit

2021-12-30 Thread Bert Gunter
es you get via their parameterizations? If so, others may be able to offer better strategies to do this, perhaps on SO -- https://stats.stackexchange.com/ -- rather than here. Cheers, Bert Gunter On Thu, Dec 30, 2021 at 12:36 AM PIKAL Petr wrote: > > Thank you Bert > > The values are

Re: [R] mixture univariate distributions fit

2021-12-29 Thread Bert Gunter
No. However, if the object returned is the "Value" structure of whatever density function you use, it probably contains the original data. You need to check the docs to see. But this does not appear to be your situation. Bert Gunter "The trouble with having an open mind is t

Re: [R] How to modify object's code living in some environment?

2021-12-28 Thread Bert Gunter
Are you aware that RStudio has its own Help resources at: https://community.rstudio.com/ As they created and maintain Shiny, perhaps you should post there. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (ak

Re: [R] How to modify object's code living in some environment?

2021-12-27 Thread Bert Gunter
I think ?body, especially the replacement form body<-, might be what you are looking for. 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

Re: [R] Request for help in solving an optimization problem

2021-12-23 Thread Bert Gunter
here for R optimization resources: https://cran.r-project.org/web/views/Optimization.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 Thu, Dec

Re: [R] Script Run Output Capturing

2021-12-23 Thread Bert Gunter
?sink explicitly says: "sink diverts R output to a connection (and stops such diversions)" Is this not exactly what you requested? If not, why not? Have you tried it to see? Bert Gunter On Thu, Dec 23, 2021 at 5:28 AM Stephen H. Dawson, DSL via R-help wrote: > > Nice! Than

Re: [R] Error Awareness

2021-12-23 Thread Bert Gunter
what sort of help you can expect (and have already received here. 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 Thu, Dec 23, 202

Re: [R] Creating NA equivalent

2021-12-21 Thread Bert Gunter
But you appear to be missing something, Jim -- see inline below (and the original post): Bert On Tue, Dec 21, 2021 at 2:00 PM Jim Lemon wrote: > > Please pardon a comment that may be off-target as well as off-topic. > This appears similar to a number of things like fuzzy logic, where an >

Re: [R] Adding SORT to UNIQUE

2021-12-21 Thread Bert Gunter
Stephen: You seem confused about data frames. sort(unique(...)) has no problem sorting individual columns in a data frame (mod the issues about mixing numerics and non-numerics that have already been discussed). But the problem is that the results can *not* be put back in a data frame because,

Re: [R] Creating NA equivalent

2021-12-20 Thread Bert Gunter
Beyond known limits are left/right censored data. You need to use statistical methodology that handles censoring. See the survival package and the CRAN Survival task view for this -- or consult an appropriate expert. There are of course standard ways of annotating such data in these packages.

Re: [R] Adding SORT to UNIQUE

2021-12-20 Thread Bert Gunter
Martin: I think the issue is this: > sort(c('a10','a1','a3')) [1] "a1" "a10" "a3" > ## wanted 'a1', 'a3', 'a10' ?? The OP would have to confirm, of course. If he only wanted to sort just numerics, coercing to numeric first would presumably handle it. For situations like the above, one probably

Re: [R] CandlestickCharts of any listed stock and fetching stock prices into R

2021-12-18 Thread Bert Gunter
Note also that there is an r-sig-finance list that would be a better place to post such queries. 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 str

Re: [R] CandlestickCharts of any listed stock and fetching stock prices into R

2021-12-18 Thread Bert Gunter
ackagename") to find this information. Only send such questions to R-help or R-devel if you get no reply or need further assistance. This applies to both requests for help and to bug reports." Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking thi

Re: [R] FinCal and ggplot2 packages in r could not be loaded.

2021-12-17 Thread Bert Gunter
Do what what the error message suggests: install the fansi package! (You may have to switch to a different repository if the one you used doesn't have it) Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (ak

Re: [R] matching type question, please

2021-12-16 Thread Bert Gunter
, y2){ >if(length(x1) > length(y1)){ > cbind(x1, x2)[(x1 %in% y1) & (x2 %in% y2),] >} else { > cbind(y1, y2)[(y1 %in% x1) & (y2 %in% x2),] >} > } > dupSpecial(xr1, xr2, xs1, xs2) > > > Hope this helps, > > Rui Barradas > >

Re: [R] matching type question, please

2021-12-16 Thread Bert Gunter
## nothing I leave it to Erin to determine whether this is relevant to her problem and, if so, how to fix up my suggestion appropriately. 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 &

Re: [R] help with parellel processing and RSelenium

2021-12-12 Thread Bert Gunter
I would suggest instead: foo <- function(pars){ with(pars, (res <- (x + y)*z^w list(result = res, message = alpha) )) } On Sun, Dec 12, 2021, 9:12 AM Rui Barradas wrote: > Hello, > > Inline. > > Às 16:43 de 12/12/21, akshay kulkarni escreveu: > > dear members, > >

Re: [R] Error in loading tidyverse library

2021-12-09 Thread Bert Gunter
no reply or need further assistance. This applies to both requests for help and to bug reports." Note that RStudio maintains 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

Re: [R] Forwarding missing arguments to the `[` method

2021-12-08 Thread Bert Gunter
)) > do.call(`[`, c(list(x), l, list(1, drop = TRUE))) [,1] [,2] [1,]13 [2,]24 Feel free to ignore without comment if this is unhelpful. Bert Gunter Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it.&qu

Re: [R] GTsummary add title with multi row

2021-12-06 Thread Bert Gunter
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 his "Bloom County" comic strip ) On Mon, Dec 6, 2021 at 9:32 AM Kai Yang via R-help wrote

Re: [R] Handling dependencies on Bioconductor packages for packages on CRAN

2021-12-04 Thread Bert Gunter
I suggest you post this on r-package-devel. That seems a better fit. 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, Dec 4, 2

Re: [R] Find tibble row with maximum recorded value

2021-12-03 Thread Bert Gunter
ct the == forms, but ...? Bert Gunter On Fri, Dec 3, 2021 at 2:56 PM Rui Barradas wrote: > > Hello, > > Inline. > > Às 22:08 de 03/12/21, Rich Shepard escreveu: > > On Fri, 3 Dec 2021, Rich Shepard wrote: > > > >> I find solutions when the data_frame is

Re: [R] Find tibble row with maximum recorded value

2021-12-03 Thread Bert Gunter
which.max(dat$cfs), I presume. see ?which.max (as usual, true tidyverse questions belong on RStudio's help site, not here). 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] A technical question on methods for "+"

2021-12-02 Thread Bert Gunter
ork. > > > > I'm not sure where it's explained, but most primitive functions dispatch on > > the class attribute, which is different from UseMethod which calls class() > > if the class attribute is NULL. > > > > I think if you want to define something like what you

Re: [R] A technical question on methods for "+"

2021-12-02 Thread Bert Gunter
tribute is NULL. > > I think if you want to define something like what you have written, you could > write a function `%+%` use that instead > > On Thu, Dec 2, 2021, 14:32 Bert Gunter wrote: >> >> ... and probably a dumb one and almost certainly not of interest to >>

[R] A technical question on methods for "+"

2021-12-02 Thread Bert Gunter
ot; ##Note also: > methods("+") [1] +.character +.Date +.IDate*+.POSIXt+.trellis* So what am I failing to understand? Thanks. Bert Gunter __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://s

Re: [R] Question about Rfast colMins and colMaxs

2021-12-01 Thread Bert Gunter
)" (You would have to go down a rabbit hole to learn about group generics for S3 classes, but I think you can ignore those details for the purposes here). Bert Gunter Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it.

Re: [R] Degree symbol as axis label superscript

2021-11-30 Thread Bert Gunter
set notation, big sums, integrals, you'll > need to get used to plotmath to make your labels. Either way, nice > suggestion, both work perfectly well for this situation > > On Tue, Nov 30, 2021, 16:24 Bert Gunter wrote: > >> True, but unnecessary with UTF-8 encodings of

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Bert Gunter
If you look at my original reply, it gives the link that tells you *exactly* what packages are "standard" (and all the thousands of others which therefore are not). Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Bert Gunter
the best practice to bring a csv file into R so it can be > accessed by colMaxs and colMins, please? > > *Stephen Dawson, DSL* > /Executive Strategy Consultant/ > Business & Technology > +1 (865) 804-3454 > http://www.shdawson.com <http://www.shdawson.com> > > >

Re: [R] Degree symbol as axis label superscript

2021-11-30 Thread Bert Gunter
nsertion of "standard" symbols. NOTE: As I am far from an expert on all of this, I would appreciate clarification or correction of any errors or misstatements in the above. Bert Gunter On Tue, Nov 30, 2021 at 11:34 AM Andrew Simmons wrote: > > Excuse my brevity, but

Re: [R] Question about Rfast colMins and colMaxs

2021-11-30 Thread Bert Gunter
ity.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 his "Bloom County" comic strip ) On Tue, N

Re: [R] Syntax help for 'Pivot_longer'

2021-11-28 Thread Bert Gunter
own Help site for these questions: https://www.tidyverse.org/help/ ## and, in particular, https://community.rstudio.com/ 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"

[R] Fwd: Package is not available for this version of R.

2021-11-26 Thread Bert Gunter
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 ) -- Forwarded message ----- From: Bert Gunter Date: Fri, Nov 26, 2021 at 10:2

Re: [R] Package is not available for this version of R.

2021-11-26 Thread Bert Gunter
You seem to be confused. The package appears to be "prob" containing a function prob.def1(). If I am correct about this, you need to review these materials in your course to proceed. Bert Gunter "The trouble with having an open mind is that people keep coming along and

Re: [R] Error: vector memory exhausted (limit reached?)

2021-11-25 Thread Bert Gunter
more ambitious and willing to check) than I will have to comment if so. 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 Thu, Nov 25,

Re: [R] Date read correctly from CSV, then reformatted incorrectly by R

2021-11-20 Thread Bert Gunter
g$Date <- as.Date(data_long$Date) > >> > ``` > >> > > >> > Using str(data), I can see that R has correctly read the dates in the > >> > format %d/%m/%y (e.g. 15/12/2015) though has the data type as chr. > >> > > >> > Once

Re: [R] tsmp::find_discord help

2021-11-20 Thread Bert Gunter
bug reports." You might check to see if the package has its own help resources. Some do. 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

Re: [R] Predictably puzzled.

2021-11-19 Thread Bert Gunter
?predict.lm says: "predict.lm produces predicted values, obtained by evaluating the regression function in the frame newdata (which defaults to model.frame(object)). " model.frame(fit) is: 1 1.37095845 -0.30663859 2 -0.56469817 -1.78130843 4 0.63286260 1.21467470 6 -0.10612452 -0.43046913

Re: [R] Confirmatory Factor Analysis

2021-11-19 Thread Bert Gunter
equests for help and to bug reports." So do not be surprised if you do not get a response here. Cross Validated, i.e. stats.stackexchange.com *might* be a better alternative. Cheers, Bert Gunter On Fri, Nov 19, 2021 at 4:40 PM AbouEl-Makarim Aboueissa wrote: > > Dear All: > >

[R] Mostly Off-topic: Scientific Data Analysis Reproducibility

2021-11-19 Thread Bert Gunter
-reproducible-in-a-world-of-custom-code-and-data/ Rhetorical question: What does "reproducibility" mean for (complex) simulation studies? Because this is off-topic, if you care to respond, please do so to me privately, off-list. Best, Bert Gunter [[alternative HTML versi

Re: [R] the opposite of pluck() in purrr

2021-11-18 Thread Bert Gunter
ovide such help: https://community.rstudio.com/ 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 Thu, Nov 18, 2021 at 1:40 PM Christop

Re: [R] lattice contourplot: how to change line width?

2021-11-17 Thread Bert Gunter
Your code is unnecessarily complex. contourplot() will by default use the panel.contourplot() function and pass down graphical arguments to it. So this suffices: contourplot(Z ~ X*Y, data = df, cuts = 3, lwd =2) Customization of the panel function appears to be unnecessary for your needs. Bert

Re: [R] [External Email] Re: how to make the far right section of a smoother line look different from the rest of that line?

2021-11-16 Thread Bert Gunter
ast week or two? > > It makes more sense to me to just highlight the last data point as > (potentially) incomplete. > > Best, > -Deepayan > > > --Chris Ryan > > > > On Tue, Nov 16, 2021 at 2:08 PM Bert Gunter > wrote: > > > > > Wher

Re: [R] how to make the far right section of a smoother line look different from the rest of that line?

2021-11-16 Thread Bert Gunter
e different points at which to plot the smoother. 2. This can almost certainly be done by creating a grouping variable to separate the two plotting regimes and might be slicker and more robust with that approach. Bert Gunter "The trouble with having an open mind is that people keep coming a

Re: [R] problem with creation of /doc/index.html

2021-11-12 Thread Bert Gunter
I believe the R-package-devel list is where you should post this, not here (though you might get lucky here). See here for details: https://www.r-project.org/mail.html Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." --

Re: [R] ggplot2: multiple box plots, different tibbles/dataframes

2021-11-11 Thread Bert Gunter
/vignettes/Ecosystem.html Still, I suspect that Jeff Newmiller may be right about needing to structure your data more appropriately for what you wish to do. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (ak

Re: [R] ggplot2: multiple box plots, different tibbles/dataframes

2021-11-10 Thread Bert Gunter
As always, online search (on "ggplot2 help") seemed to bring up useful resources. I suggest you look here (suggested tutorials and resources are farther down the page): https://ggplot2.tidyverse.org/ Bert Gunter On Wed, Nov 10, 2021 at 12:16 PM Rich Shepard wrote: > > On

Re: [R] (no subject)

2021-11-09 Thread Bert Gunter
Questions about package development should be posted to R-package-devel (**not R-devel**). See https://www.r-project.org/mail.html for details. (I am not sure that they get into legal weeds there, but it seems like the right place to try). Bert Gunter "The trouble with having an open

Re: [R] Plotly

2021-11-08 Thread Bert Gunter
As Plotly for R is a product of private company, your query is off topic here (though you may get a response if you are lucky). They have their own Help forum to which you should post instead: https://community.plotly.com/c/graphing-libraries/r/9 Bert Gunter "The trouble with having an

Re: [R] extracting a R object from an R image

2021-11-05 Thread Bert Gunter
posed to load(). " You may wish to search on "data serialization" (e.g. on Wikipedia) or similar to better understand the underlying ideas. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley

Re: [R] names.data.frame?

2021-11-04 Thread Bert Gunter
" Running `methods(names)` lists quite a few methods, ..." Depending on what packages you have loaded of course. Bert On Thu, Nov 4, 2021 at 7:43 AM Duncan Murdoch wrote: > On 04/11/2021 10:38 a.m., Jorgen Harmse via R-help wrote: > > Can someone please explain what Leonard Mada is trying to

Re: [R] What to do when problems() returns nothing

2021-11-03 Thread Bert Gunter
about it: https://www.tidyverse.org/help/ 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, Nov 3, 2021 at 11:50 AM Rich Shepard wr

Re: [R] Fwd: Merging multiple csv files to new file

2021-11-03 Thread Bert Gunter
I should have added that once read into R, the collection of data frames (presumably) can also be saved in one .Rdata file via save() **without** first combining them into a list. I still prefer keeping them together as one list in R, but that's up to you. Bert Gunter "The trouble with h

Re: [R] Fwd: Merging multiple csv files to new file

2021-11-03 Thread Bert Gunter
if you don't know what these are, of course). 3. Save your list as an .Rdata file. See ?save and ?load for details. But do note that such files are special binary files only (easily anyway) readable by R. Bert Gunter "The trouble with having an open mind is that people keep coming

Re: [R] sink() not working as expected

2021-11-02 Thread Bert Gunter
What do you think these 2 lines are doing? cat ('corvalis discharge summary\n') print(cat) Please consult ?cat . You might also spend a bit of (more?) time with an R tutorial or two as you seem confused about how assignment (<-) works. Or maybe I'm confused about what is confusing you.... B

Re: [R] by group

2021-11-01 Thread Bert Gunter
... maybe not. According to Rdocumentation.org: reshape2's status is: reshape2 is retired: only changes necessary to keep it on CRAN will be made. We recommend using tidyr <http://tidyr.tidyverse.org/> instead. Bert Gunter "The trouble with having an open mind is that people keep c

Re: [R] by group

2021-11-01 Thread Bert Gunter
a data.frame. write() or write.table() can be used to write it to a file in whatever format is desired (e.g. with or without row,column names. Etc. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Be

Re: [R] Error in dis[sppInSample,sppInSample]:subscript out of bounds

2021-11-01 Thread Bert Gunter
d this information. *Only* send such questions to R-help or R-devel if you get no reply or need further assistance. This applies to both requests for help and to bug reports." Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it."

Re: [R] How to slice the array?

2021-11-01 Thread Bert Gunter
Have you spent time with any R tutorials? Your queries are really elementary, and this list really cannot serve as a tutorial service. See the Posting Guide linked below for what help you can expect here ... and how to post queries that will get that help. Cheers, Bert Gunter "The tr

Re: [R] Help needed with data visualization in R

2021-11-01 Thread Bert Gunter
... a simple web search on "bubble plots R" (what else?) would have brought up many relevant hits. One should always try such obvious "homework" before posting here. Better and quicker info often results. Bert Gunter "The trouble with having an open mind is that

[R] Probably off topic but I hope amusing

2021-10-29 Thread Bert Gunter
There was a little discussion today (yet again) about floating point arithmetic. Perhaps related to this, I subscribe to the online NYTimes, which flashes U.S. stock index prices at the top of its home page. Today, instead of the Nasdaq price being flashed, there was this: undefined-NaN% I

Re: [R] R code in RData

2021-10-27 Thread Bert Gunter
correct. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Oct 27, 2021 at 10:18 AM Bogdan Tanasa wrote: > Dear all,

Re: [R] Need help in R

2021-10-26 Thread Bert Gunter
> findprm(66) [1] 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 I'll leave it to you to work out the details for how it works. :-) And, of course, there are almost certainly even better ways to do this, but this should get you started. Cheers, Bert Bert Gunter "The trouble with

Re: [R] Dates as headers causing confusion but needed to convert to Julian days for ANOVA

2021-10-25 Thread Bert Gunter
0 1 1 5 2 2 6 3 3 7 However, because your column names are *not* syntactically valid, you'll have to change them anyway to avoid further infelicities in accessing and manipulating the data(e.g. see ?names). How you choose to do this is up to you.

Re: [R] problem with plotting clustered data with convex hull using ggfortify

2021-10-24 Thread Bert Gunter
vignettes for the package. They seem fairly extensive from my quick look and may well provide the answers you seek. Bert Gunter On Sun, Oct 24, 2021 at 1:57 PM Karl Schilling wrote: > Dear all: > > I have some data that I want to cluster and display as groups surrounded > by conve

Re: [R] create mean ksvm model

2021-10-23 Thread Bert Gunter
change.com/ . 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, Oct 23, 2021 at 1:19 PM Luigi Marongiu wrote: > Hello, > I am usin

Re: [R] Wild cards for dataframes

2021-10-22 Thread Bert Gunter
ons R". 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, Oct 22, 2021 at 2:21 AM Steven Yen wrote: > I like to be able to use

Re: [R] Split plot panel into rows with different columns

2021-10-21 Thread Bert Gunter
s [1] 4 5 > > split.screen(c(1, 2), screen = 3) # split third screen into two columns [1] 6 7 > > screen(1) > plot(1:10) Error in plot.new() : figure margins too large > par(mar = c(2,1,1,1)) > plot(1:10) ## plots on screen 1 Bert Gunter "The trouble with having an open mi

Re: [R] Chi-square test: Specifying expected proportions for two way table

2021-10-16 Thread Bert Gunter
olumn marginals." Moreover, expected counts are one component of the returned result (see the "value" section). Proportions can of course easily then be obtained if so desired. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking thin

Re: [R] Subset command

2021-10-15 Thread Bert Gunter
ve understood correctly, as it will look for those names within mydata. 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, Oct 15,

Re: [R] how to do inverse log of every value in every column in data frame

2021-10-14 Thread Bert Gunter
e(s) in data frame: Species > > exp(iris[-5]) # remove the offending column > # output omitted > > > Hope this helps, > > Rui Barradas > > > Às 18:23 de 14/10/21, Ana Marija escreveu: > > Thank you so much! > > > > On Thu, Oct 14, 2021 at 12:17 P

Re: [R] how to do inverse log of every value in every column in data frame

2021-10-14 Thread Bert Gunter
As all of your columns are numeric, you should probably convert your df to a matrix. Then use exp() on that, of course: exp(as.matrix(b)) see ?exp 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] How to rotate only one panel by 90 degrees in R plot?

2021-10-12 Thread Bert Gunter
)) print(dp, newp = FALSE, ## this is the print.trellis method panel.width = list(1,"npc"), panel.height = list(1, "npc") ) Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathe

Re: [R] How to convert line plot to lattice xtplot?

2021-10-12 Thread Bert Gunter
You have misspecified the grouping. df$subs <- rep(1:4, e=4) xyplot(Value ~ Concentration, groups = subs, data = df, ##... etc. 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] How to add error bars to lattice xyplot

2021-10-11 Thread Bert Gunter
x1 = log10(df$Concentration), y0 = df$Value - dfsd$Value, y1 = df$Value + dfsd$Value, col = COLS) } Bert Gunter "The trouble with having an open mind is that people keep coming along and stic

Re: [R] How to use ifelse without invoking warnings

2021-10-07 Thread Bert Gunter
ppressWarnings(ans <- ifelse (k >= -1 & k <= n, pbeta(p,k+1,n-k,lower.tail=FALSE), ifelse (k < -1, 0, 1) )) ## no warnings 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] Strange behavior of 2-d array within function

2021-10-06 Thread Bert Gunter
Likely impossible to answer without seeing your code. 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, Oct 6, 2021 at 11:33 AM Gabrie

Re: [R] RSQLite slowness

2021-10-06 Thread Bert Gunter
Generally, such gene-related questions are better asked on Bioconductor than here. They also might know of more efficient, purpose built tools for your efforts there. No guarantees, of course, and you might get a helpful response here. But if not ... Bert Gunter "The trouble with having an

Re: [R] (no subject)

2021-10-06 Thread Bert Gunter
damage. For CRAN, at least, I believe it's download at your own risk. Presumably, virus checking capabilities at the local level could check all such downloads, as per usual. Correction and clarification of any of the above welcome of course. Bert Gunter "The trouble with having an open

Re: [R] Rename variables starting with digits

2021-10-05 Thread Bert Gunter
syntactically valid name. See ?data.frame and ?make.names for details > d2 <-data.frame(a = 1:3, `1b` = letters[1:3], check.names = FALSE) > names(d2) [1] "a" "1b" So what does names(behavioral_df) give? Bert Gunter "The trouble with having an

Re: [R] Descriptive Statistics: useful hacks

2021-10-02 Thread Bert Gunter
a package with carefully written and tested code and documented functionality. If you have suggestions about how to improve a *particular* package, a better alternative is probably to contact the package maintainer. Bert Gunter "The trouble with having an open mind is that people keep coming

Re: [R] how to combine logic test on vectors in R?

2021-09-30 Thread Bert Gunter
I haven't followed this thread closely, but to your question I think maybe this is what you want" > z <- c("","") > all(z == "") [1] TRUE > z <- c("a","") > all(z == "") [1] FALSE If this isn't it, just ignore wit

Re: [R] NA values for "col"

2021-09-27 Thread Bert Gunter
I don't have a clue. But the difference is documented. Bert On Mon, Sep 27, 2021 at 2:43 PM Bert Gunter wrote: > > ?text says > > "... NA values of font are replaced by par("font"), and similarly for col." > > > Bert Gunter > > "

Re: [R] NA values for "col"

2021-09-27 Thread Bert Gunter
?text says "... NA values of font are replaced by par("font"), and similarly for col." 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] Installed packages: Bioconductor vs CRAN?

2021-09-24 Thread Bert Gunter
Oh, I should have added that packages can be on other repositories (local, github,...) and I think can be both in CRAN and BIOC . So your query would not seem to have a clear answer. AFAICS anyway. Bert Gunter "The trouble with having an open mind is that people keep coming along and sti

Re: [R] Installed packages: Bioconductor vs CRAN?

2021-09-24 Thread Bert Gunter
The help file tells you that installed.packages() looks at the DESCRIPTION files of packages. Section 1.1.1 of "Writing R Extensions" tells you what information is in such files. Bert Gunter "The trouble with having an open mind is that people keep coming along and

Re: [R] alternative to subset(dataframe, select = - column) in R

2021-09-24 Thread Bert Gunter
If you correct my typo as my followup message indicated, match() works fine. As does logical indexing with %in%. The != version will work for your query, but does not generalize to deleting several columns. The point is to heed Jeff N's advice. Bert Gunter "The trouble with having an open

Re: [R] alternative to subset(dataframe, select = - column) in R

2021-09-24 Thread Bert Gunter
typo. Correction: x <- new[-match("ID", names(new))] 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, Sep 24, 2021 at

Re: [R] alternative to subset(dataframe, select = - column) in R

2021-09-24 Thread Bert Gunter
x <- new[-match("ID"), names(new))] 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, Sep 24, 2021 at 7:10 AM

Re: [R] Improve my plot

2021-09-20 Thread Bert Gunter
Genève","Zoug","Tessin","Neuchâtel","Vaud","Uri","Nidwald","Berne(d)","Zurich","Obwald","Saint-Gall","Soleure","Lucerne","Glaris","Bâle-Campagne",&q

Re: [R] how to remove factors from whole dataframe?

2021-09-19 Thread Bert Gunter
an idea of how to be able to say undo factorization properly when needed, > such as before saving it to disk in some data structure, or when passing it > for some other analysis where a non-factor form would work better. > > NOTE: I threw this together quickly and may well have made e

Re: [R] how to remove factors from whole dataframe?

2021-09-19 Thread Bert Gunter
You do not understand factors. There is no "base type" that can be recovered. > f <- factor(c(5.1, 6.2), labels = c("whoa","baby")) > f [1] whoa baby Levels: whoa baby > unclass(f) [1] 1 2 attr(,"levels") [1] "whoa" "baby&

Re: [R] Cacheing of functions from libraries other than the base in Rmarkdown

2021-09-18 Thread Bert Gunter
I think you should post on the RStudio help forums. They have specific areas to ask for help on their stuff, at least for some of it. You may wish to wait a bit before doing so, though, just to see if someone here responds. Bert On Sat, Sep 18, 2021, 12:26 PM Chris Evans wrote: > This

Re: [R] ReadItem: Error

2021-09-18 Thread Bert Gunter
Did you try infoRDS() ? It **may** tell you something useful, though it cannot tell you whether the file is corrupted or not. If you post its results here, someone **may** be able to tell you something informative. That's all I got. Bert Gunter "The trouble with having an open

Re: [R] Improvement: function cut

2021-09-17 Thread Bert Gunter
Perhaps you and Andrew should take this discussion off list... 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, Sep 17, 2021 at 3:45 P

Re: [R] calculate power-linear mixed effect model

2021-09-17 Thread Bert Gunter
> > On Fri, Sep 17, 2021 at 3:06 PM Bert Gunter wrote: > > > > Wrong list! Post on r-sig-mixed-models, not here. > > > > Bert Gunter > > > > "The trouble with having an open mind is that people keep coming along > > and sticking things into it.&

Re: [R] calculate power-linear mixed effect model

2021-09-17 Thread Bert Gunter
Wrong list! Post on r-sig-mixed-models, not here. 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, Sep 17, 2021 at 12:22 PM Ana Marij

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