Re: [R] SQL and R

2024-12-11 Thread Eberhard W Lisse
Looks like an assignment question. If so, do your homework yourself. Google is your friend el On 2024-12-11 15:16, akshay kulkarni wrote: > dear Members, I have recently started studying SQL and MySQL. My > question is, what exactly is SQL used for? That is, whatever can be > done by SQL, like

Re: [R] Identify first row of each ID within a data frame, create a variable first =1 for the first row and first=0 of all other rows

2024-11-30 Thread Christopher W. Ryan via R-help
Sorry, for completeness: library(dplyr) olddata %>% group_by(ID) %>% mutate(first = as.integer(row_number() == 1)) --Chris Ryan Christopher W. Ryan wrote: > Personally, I'd do this in the tidyverse with dplyr and its row_number() > function. > > olddata %>% gro

Re: [R] Identify first row of each ID within a data frame, create a variable first =1 for the first row and first=0 of all other rows

2024-11-30 Thread Christopher W. Ryan via R-help
Personally, I'd do this in the tidyverse with dplyr and its row_number() function. olddata %>% group_by(ID) %>% mutate(first = as.integer(row_number() == 1)) --Chris Ryan Sorkin, John wrote: > ID <- c(rep(1,10),rep(2,6),rep(3,2)) > date <- c(rep(1,2),rep(2,2),rep(3,2),rep(4,2),rep(5,2), >

[R] when installing packages for R on Linux, is it better to use my distro's package manager, or install.packages()?

2024-09-28 Thread Christopher W. Ryan
I'm running R (currently 4.4.1) on Linux Mint > sessionInfo() R version 4.4.1 (2024-06-14) Platform: x86_64-pc-linux-gnu Running under: Linux Mint 20.3 ...truncated... To install a new R package, is it better to use Linux Mint's pacakge manager (e.g. synaptic, apt-get, or similar), or to install

Re: [R] how to specify point symbols in the key on a lattice dotplot

2024-09-14 Thread Christopher W. Ryan
9E53101D261BEC070CFF1A0DC8BC50E715A672A0 On Sat, 14 Sep 2024 13:27:23 +0530, Deepayan Sarkar wrote: >On Fri, 13 Sept 2024 at 23:36, Christopher W. Ryan > wrote: >> >> For me, Bert's suggestion produces a plot with two black symbols >> above the plotting region, a circle and a triangle

Re: [R] how to specify point symbols in the key on a lattice dotplot

2024-09-13 Thread Christopher W. Ryan
ransit_time, groups = impact, data = ., >pch = 16:17, >cex = 1.8, >scales = list(cex = 1.4), >key = list(points = list(pch =16:17) )) > >Cheers, >Bert > > >On Fri, Sep 13, 2024 at 9:53 AM Christopher W. Ryan &

Re: [R] how to specify point symbols in the key on a lattice dotplot

2024-09-13 Thread Christopher W. Ryan
the most from their data. www.agencystatistical.com Public GnuPG email encryption key at https://keys.openpgp.org 9E53101D261BEC070CFF1A0DC8BC50E715A672A0 On Fri, 13 Sep 2024 08:29:20 +0100, CALUM POLWART wrote: >Add: > >key = list(points=16:17) > >Into the dotplot section possibly without the

[R] how to specify point symbols in the key on a lattice dotplot

2024-09-13 Thread Christopher W. Ryan
I am making a dotplot with lattice, as follows: dd %>% dotplot( segment ~ transit_time, groups = impact, data = ., as.table = TRUE, pch = 16:17, cex = 1.8, scales = list(cex = 1.4), auto.key = TRUE) impact is a factor

[R] Fwd: effects() extractor for a quantile reqression object: error message

2024-09-06 Thread Koenker, Roger W
Apologies, forgot to copy R-help on this response. Begin forwarded message: From: Roger Koenker Subject: Re: [R] effects() extractor for a quantile reqression object: error message Date: September 6, 2024 at 8:38:47 AM GMT+1 To: "Christopher W. Ryan" Chris, This was intended

[R] effects() extractor for a quantile reqression object: error message

2024-09-05 Thread Christopher W. Ryan via R-help
I'm using quantreg package version 5.98 of 24 May 2024, in R 4.4.1 on Linux Mint. The online documentation for quantreg says, in part, under the description of the rq.object, "The coefficients, residuals, and effects may be extracted by the generic functions of the same name, rather than by the $

[R] lattice panel layout like cross-tabs, like a 2 x 2 table.

2024-08-30 Thread Christopher W. Ryan via R-help
Years ago, I recall creating lattice plots with two binary factors, call them f1 and f2, as in xyplot(y ~ x | f1 + f2, data = dd) and I made it so the rows had strips on the left with the levels of one factor, and the columns had strips on the top with the levels of the other factor. Sort of lik

[R] unable to get barchart of censored subjects from ggsurvplot() in survminer package, if there is no predcitor

2024-06-17 Thread Christopher W. Ryan via R-help
Hello. Running R 4.2.3 on Windows 10. Using survimer package version survminer_0.4.9 published 2021-03-09. I'm encountering an error with ggsurvplot() in the survminer package. Email to the author/maintainer about 2 weeks ago has not yet resulted in a reply. I seem unable to produce a n.censor.ta

Re: [R] x[0]: Can '0' be made an allowed index in R?

2024-04-24 Thread Hans W
I hereby protest strongly against the misuse of this thread through unnecessary and pointless discussions. My request was satisfactorily answered with references to R libraries and legitimate warnings about the use of zero-based indexing schemes in R. If you want to continue the discussions, PLEASE

Re: [R] x[0]: Can '0' be made an allowed index in R?

2024-04-22 Thread Hans W
t 13:36, Ben Bolker wrote: > > https://cran.r-project.org/package=index0 > > On Sun, Apr 21, 2024, 3:56 AM Hans W wrote: >> >> As we all know, in R indices for vectors start with 1, i.e, x[0] is not a >> correct expression. Some algorithms, e.g. in graph theory or comb

[R] x[0]: Can '0' be made an allowed index in R?

2024-04-21 Thread Hans W
library that provides this functionality? Or is there a simple trick to do this in R? The expression 'x[0]' must be possible, does this mean the syntax of R has to be twisted somehow? Thanks, Hans W. [[alternative HTML version deleted]] _

Re: [R] Exceptional slowness with read.csv

2024-04-08 Thread Eberhard W Lisse
I find QSV very helpful. el On 08/04/2024 22:21, Dave Dixon wrote: > I solved the mystery, but not the problem. The problem is that > there's an unclosed quote somewhere in those 5 additional records I'm > trying to access. So read.csv is reading million-character fields. > It's slow at that. Tha

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

2023-12-29 Thread Dr Eberhard W Lisse
Andy, you can always open a public Dropbox or Google folder and post the link. el On 29/12/2023 22:37, Andy wrote: > Thanks - I'll have a look at these options too. > > I'm happy to send over a sample document, but wasn't aware if > attachments are allowed. The documents come Lexis+, so require

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

2023-12-29 Thread Dr Eberhard W Lisse
I would also look at https://pandoc.org perhaps which can export a number of formats... And for spreadsheets https://github.com/jqnatividad/qsv is my goto weapon. Can also read and write XLSX and others. A sample document or two would always be helpful... el On 29/12/2023 21:01, CALUM POLWART

Re: [R] Code editor for writing R code

2023-11-30 Thread Dr Eberhard W Lisse
Sublime Text. On all platforms. On 29/11/2023 17:57, Christofer Bogaso wrote: > Hi, > > Currently I use VS-Code to write codes in R. While it is very good, it > does not allow me to write Latex expressions in comments, which I am > willing to have to write corresponding mathematical expressions a

Re: [R] anyone having trouble accesing CRAN?

2023-11-15 Thread Christopher W. Ryan via R-help
Ah, thanks all. Guess I missed the message before they started the maintenance. --Chris Ivan Krylov wrote: > On Wed, 15 Nov 2023 14:13:00 -0500 > "Christopher W. Ryan via R-help" wrote: > >> Anyone seeing similar? > > Same for me. > > While it worked, C

[R] anyone having trouble accesing CRAN?

2023-11-15 Thread Christopher W. Ryan via R-help
at https://cran.r-project.org/ I get this error message: = Secure Connection Failed An error occurred during a connection to cran.r-project.org. PR_END_OF_FILE_ERROR Error code: PR_END_OF_FILE_ERROR The page you are trying to view cannot be shown because the authenticity

Re: [R] Dependency errors for package pracma

2023-11-09 Thread Hans W
What really interests me: With all those strict checking procedures, how is it possible that the new 'Matrix' version got accepted on CRAN? I think this happened twice to me before, and it takes a lot of time to check package dependencies that turn out to be not dependent -- more time than checki

[R] Dependency errors for package pracma

2023-11-08 Thread Hans W
I tried to update my package {pracma} on CRAN from 2.4.2 (2022-09-21) to version 2.4.4 (2023-11-08). This package reverse depends / imports / suggests on 350 packages on CRAN and 25 packages on Bioconductor. The only changes are small corrections on some help files, a new function for stereographi

Re: [R] make a lattice dotplot with symbol size proportional to a variable in the plotted dataframe

2023-11-08 Thread Christopher W. Ryan via R-help
Very helpful, Deepayan, and educational. Thank you. What does NSE stand for? Thanks, Chris Deepayan Sarkar wrote: > > --Chris Ryan __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEAS

Re: [R] Sum data according to date in sequence

2023-11-02 Thread Christopher W. Ryan via R-help
date appears to be a character variable, and R is treating it as such. str(dt1) might give you some insight. Or the dplyr equivalent glimpse(dt1) I think R did what you asked, but if you want to be able to order records by date, in temporal order, you need to tell R that it is a date: library

Re: [R] Noisy objective functions

2023-08-13 Thread Hans W
;SANN". See the Optimization cheatsheet I wrote with John Nash: "NOTE: CG (John is the author!) and SANN are NOT recommended." https://github.com/hwborchers/CheatSheets/blob/main/Base%20R%20Optim%20Cheatsheet.pdf Hans W. On Sun, 13 Aug 2023 at 21:28, Hans W wrote: > > While w

[R] Noisy objective functions

2023-08-13 Thread Hans W
While working on 'random walk' applications, I got interested in optimizing noisy objective functions. As an (artificial) example, the following is the Rosenbrock function, where Gaussian noise of standard deviation `sd = 0.01` is added to the function value. fn <- function(x) (1

Re: [R] detect and replace outliers by the average

2023-04-20 Thread Dr Eberhard W Lisse
There is at least one outliers package on CRAN. el On 20/04/2023 20:43, AbouEl-Makarim Aboueissa wrote: > Dear All: *please discard my previous email* > > > > *Re:* detect and replace outliers by the average > > > > The dataset, please see attached, contains a group factoring column “ > *fa

Re: [R] wininet deprecation

2023-02-21 Thread Selke, Gisbert W.
On Mon, 20 Feb 2023 15:58:33 +, Stadler Thomas wrote: > as the download method 'wininet' is deprecated, I'm looking into alternative > ways to install packages from within R. > Unfortunately, curl, libcurl and wget refuse to cooperate with Kerberos on > our corporate setup. > When exactly

Re: [R] Amazing AI

2022-12-19 Thread Christopher W. Ryan via R-help
In clinical medicine, the question the patient asks rarely represents their main concern. Most of what I've done in my career, and most of what I've taught, is about how to have the back-and-forth dynamic dialoq with the patient, to help them formulate what's really on their mind, and make sure I u

Re: [R] Reading Text files from UK Met Office into R again...

2022-10-09 Thread Dr Eberhard W Lisse
Does it say what the new format is? On 2022-10-09 13:01 , Nick Wray wrote: [...] > Up to 2010 everything's fine and dandy - the data is in nice neat columns > and I can download it and filter out what I don't want. But after 2010 the > format changes (The Met Office in fact say on their guideline

Re: [R] Deprecating download method='wininet' in R on Windows causes trouble with corporate proxy

2022-09-29 Thread Selke, Gisbert W.
On Fri, Sep 30, 2022 at 01:27 Henrik Bengtsson wrote > Is R centrally installed? It usually (but not always...) is installed through a central install process, but installations will not be kept synchronized. (I.e., we end up having independent installations, many different versions, many di

[R] Deprecating download method='wininet' in R on Windows causes trouble with corporate proxy

2022-09-29 Thread Selke, Gisbert W.
Method="wininet" is deprecated and scheduled to go away, the standard method is now libcurl. This causes trouble for all R users in our shop, because we are sitting behind a corporate proxy, which uses Kerberos authentication. (We're all on Windows.) Using wininet, this used to work without pro

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

2022-09-29 Thread Dr Eberhard W Lisse
To me this file looks like a CSV with 15 fields (on each line) not 16, the last field being empty with the exception of the one which has the 'B'. The 14th is always empty. I also note that it does not seem to have a new line at the end. I can strongly recommend QSV to manipulate CSV files and

Re: [R] How to parse a really silly date with lubridate

2022-07-13 Thread Dr Eberhard W Lisse
Bui, thanks, this what Avi suggested in an email to me as well and works. It's so easy if you know it :-)-O el On 2022-07-13 23:40 , Rui Barradas wrote: Hello, Are you looking for mutate? In the example below I haven't included the filter, since the tibble only has 2 rows. But the date co

Re: [R] How to parse a really silly date with lubridate

2022-07-13 Thread Dr Eberhard W Lisse
Hi, while all of the below work in a character vector, none works in the tibble. The following DDATA %>% add_column(as.tibble(lubridate::dmy_hm(DDATA$Date)), .before = "Period") %>% rename(NewDate=value) %>% selec

Re: [R] Circular Graph Recommendation Request

2022-05-29 Thread Christopher W. Ryan via R-help
If the units of analysis are real spatial regions (e.g. states), how about a cartogram? https://gisgeography.com/cartogram-maps/ An R package (I have no experience with it) https://cran.r-project.org/web/packages/cartogram/index.html The advantage of a cartogram is that it is a single graphic,

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

2022-03-14 Thread Christopher W Ryan via R-help
"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, Mar 14, 2022 at 9:27 AM Christopher W Ryan via R-help > wrote: > > > >

[R] R Redis

2021-11-28 Thread Hans W
> Have anybody used this module? > https://cran.r-project.org/web/packages/rredis/README.html > > Could share your experience please. thank you. I have successfully used this package (on Linux and macOS) and I think it is a great way of storing hashed data across different platforms and programmin

[R] the opposite of pluck() in purrr

2021-11-18 Thread Christopher W. Ryan via R-help
I've just learned about pluck() and chuck() in the purrr package. Very cool! As I understand it, they both will return one element of a list, either by name or by [[]] index, or even "first" or "last" I was hoping to find a way to return all *but* one specified element of a list. Speaking loosel

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 Christopher W Ryan via R-help
rouble 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, Nov 16, 2021 at 7:45 AM Christopher W Ryan via R-help < > r-help@r-pro

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

2021-11-16 Thread Christopher W Ryan via R-help
eclrs.3 %>% mutate(start.week = floor_date(realCollectionDate, unit = "week")) %>% group_by(start.week, k12) %>% summarise(n = n(), pctpos = 100 * mean(realResult)) %>% xyplot(pctpos ~ start.week | k12, col = "red", data = ., layout = c(1,2), ylab = "percent of test results positive", xlab = "spec

Re: [R] [External Email] Live Online Training for High School Teachers and Students

2021-11-04 Thread Christopher W Ryan via R-help
Tracy-- I enjoy doing this sort of thing. Over the years I've done two full-day "introduction to R" workshops for high school students. The workshops also inevitably get into software-agnostic, basic issues about how to think about data, and how to measure, record, and store it---which is all pret

Re: [R] cleanup/replacing a value on condition of another value

2021-10-26 Thread Dr Eberhard W Lisse
Thanks. Your method mutate( cases = ifelse( country == 'Namibia' & type == 'confirmed' & date == '2021-10-23' & cases == 357, NA, cases ) ) works, as does Rui's mutate( cases = replace( cases,

Re: [R] cleanup/replacing a value on condition of another value

2021-10-25 Thread Dr Eberhard W Lisse
Thank you very much, 'which' does the trick :-)-O greetings, el On 2021-10-25 19:06 , Rui Barradas wrote: Hello, Here is a pipe to replace based on the composite condition. It uses ?base::replace with an integer index vector. [...] library(dplyr) data(coronavirus, package = "coronavirus

Re: [R] cleanup/replacing a value on condition of another value

2021-10-25 Thread Dr Eberhard W Lisse
gt;) > > > > Can you post the pipe code you are running? > > Hope this helps, > > Rui Barradas > > Às 12:25 de 25/10/21, Dr Eberhard W Lisse escreveu: >> Hi, >> >> I have data from JHU via the 'coronavirus' package which has a value f

[R] cleanup/replacing a value on condition of another value

2021-10-25 Thread Dr Eberhard W Lisse
Hi, I have data from JHU via the 'coronavirus' package which has a value for the confirmed cases for 2021-10-23 which differs drastically (357) from what is reported in country (23). # A tibble: 962 × 4 country date type cases 1 Namibi

Re: [R] [External Email] Group by and add a constant value based on a condition dply

2021-05-26 Thread Christopher W Ryan via R-help
Is the grouping beforehand necessary? Could you simply, "for all the dates that are "4.01.2020" and have the "Value" greater than zero add 5 to the "Value" "? I may be missing something. --Chris Ryan On Wed, May 26, 2021 at 11:53 AM Elahe chalabi via R-help < r-help@r-project.org> wrote: > Hi

Re: [R] Testing optimization solvers with equality constraints

2021-05-22 Thread Hans W
Yes. "*on* the unit sphere" means on the surface, as you can guess from the equality constraint. And 'auglag()' does find the minimum, so no need for a special approach. I was/am interested in why all these other good solvers get stuck, i.e., do not move away from the starting point. And how to av

Re: [R] Testing optimization solvers with equality constraints

2021-05-21 Thread Hans W
Mark, you're right, and it's a bit embarrassing as I thought I had looked at it closely enough. This solves the problem for 'alabama::auglag()' in both cases, but NOT for * NlcOptim::solnl -- with x0 * nloptr::auglag -- both x0, x1 * Rsolnp::solnp -- with x0 * Rdonlp::donlp

[R] Testing optimization solvers with equality constraints

2021-05-21 Thread Hans W
Just by chance I came across the following example of minimizing a simple function (x,y,z) --> 2 (x^2 - y z) on the unit sphere, the only constraint present. I tried it with two starting points, x1 = (1,0,0) and x2 = (0,0,1). #-- Problem definition in R f = function(x) 2 * (x[1]^2 -

Re: [R] Stata/Rstudio evil attributes

2021-04-10 Thread Koenker, Roger W
us again how much you paid > for the use of the haven package? > > Best, > Wolfgang > >> -Original Message- >> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Koenker, >> Roger W >> Sent: Saturday, 10 April, 2021 11:26 >>

[R] Stata/Rstudio evil attributes

2021-04-10 Thread Koenker, Roger W
As shown in the reproducible example below, I used the RStudio function haven() to read a Stata .dta file, and then tried to do some fitting with the resulting data.frame. This produced an error from my fitting function rqss() in the package quantreg. After a bit of frustrated cursing, I conve

Re: [R] How to average minutes per hour per month in the form of '# hours #minutes'

2021-03-26 Thread Dr Eberhard W Lisse
l On 2021-03-25 22:37 , Jeff Newmiller wrote: > This is a very unclear question. Weeks don't line up with months.. > so you need to clarify how you would do this or at least give an > explicit example of input data and result data. > > On March 25, 2021 11:34:15 AM PDT, Dr Eberh

Re: [R] How to average minutes per hour per month in the form of '# hours #minutes'

2021-03-25 Thread Dr Eberhard W Lisse
know of any leap hours. On Sun, Mar 21, 2021 at 8:31 AM Dr Eberhard W Lisse wrote: Hi, I have minutes worked by day (with some more information) which when using library(tidyverse) library(lubridate) run through CONSMINUTES %>% select(datu

[R] How to average minutes per hour per month in the form of '# hours #minutes'

2021-03-21 Thread Dr Eberhard W Lisse
Hi, I have minutes worked by day (with some more information) which when using library(tidyverse) library(lubridate) run through CONSMINUTES %>% select(datum, dauer) %>% arrange(desc(datum)) look somewhat like # A tibble: 142 x

Re: [R] Command history

2021-03-01 Thread Dr Eberhard W Lisse
L Carlson > > On Sun, Feb 28, 2021 at 9:06 AM Dr Eberhard W Lisse <mailto:e...@lisse.na>> wrote: > > On the Mac it is ~/.Rhistory > > el > > On 2021-02-28 15:39 , Mahmood Naderan-Tahan wrote: > > Hi > > > > May I know

Re: [R] Command history

2021-02-28 Thread Dr Eberhard W Lisse
; > > Regards, > Mahmood [...] -- Dr. Eberhard W. Lisse \ / Obstetrician & Gynaecologist e...@lisse.na / * | Telephone: +264 81 124 6733 (cell) PO Box 8421 Bachbrecht \ / If this email is signed with GPG/PGP 10007, Namibia ;/ Sect 20 of

Re: [R] Command history

2021-02-28 Thread Dr Eberhard W Lisse
On the Mac it is ~/.Rhistory el On 2021-02-28 15:39 , Mahmood Naderan-Tahan wrote: > Hi > > May I know where is the location of commands we used in R in the history? > > > Regards, > Mahmood-- Dr. Eberhard W. Lisse \ / Obstetrician & Gy

[R] Is there anyone who uses both R and Python here? How do you debug? Perhaps in RStudio?

2021-01-26 Thread C W
Hello all, I'm a long time R user, but recently also using Python. I noticed that RStudio rolled out Python through reticulate. It's great so far! My question is, how do you debug in Python? In R, I simply step through the code script in my console with cmd+enter. But you can't do that with Pyth

Re: [R] Troubles installing Rcmdr on Mac

2021-01-12 Thread Dr Eberhard W Lisse
16:19, John Fox wrote: > Dear Eberhard, > > On 2021-01-12 12:32 a.m., Dr Eberhard W Lisse wrote: >> John, >> >> what is wrong with installing Xcode’s command lime tools (not Xcode >> itself)? > > Nothing, and I did miss the distinction, but it should

Re: [R] Troubles installing Rcmdr on Mac

2021-01-11 Thread Dr Eberhard W Lisse
John, what is wrong with installing Xcode’s command lime tools (not Xcode itself)? — Sent from Dr Lisse’s iPhone On 12 Jan 2021, 04:30 +0200, John Fox , wrote: > Dear Stephane, > > I've taken yet another look at this and have an additional suggestion > for your students to try: > > install.packa

Re: [R] Troubles installing Rcmdr on Mac

2021-01-11 Thread Dr Eberhard W Lisse
Use RStudio. But it can be that the command line tools are missing, which you (may) need to compile packages (from source).Ask one of them to open a terminal window and type the command ‘make —version’ without the ‘’) if that results in an error they need to enter ‘sudo xcode-select —install’ a

Re: [R] Windows path backward slash

2020-12-24 Thread Dr Eberhard W Lisse
PLEASE do read the posting guide >>> http://www.R-project.org/posting-guide.html >>> and provide commented, minimal, self-contained, reproducible code. >>> >> > > [[alternative HTML version deleted]] > > _

Re: [R] Finance & R

2020-12-23 Thread Dr Eberhard W Lisse
ere must be something more recent on the market. Any >> suggestions will be much appreciated! >> >> Cheers, >> Ben van den Anker [...] -- Dr. Eberhard W. Lisse \ / Obstetrician & Gynaecologist e...@lisse.na / * | Telephone: +264 81 124 6

Re: [R] FInd packages in need of Update (like RStudio)

2020-12-23 Thread Dr Eberhard W Lisse
Or rather Rscript -e 'local({r <- getOption("repos");r["CRAN"] <- "https://cloud.r-project.org/";options(repos = r)});update.packages(dependencies = TRUE, ask=FALSE)' as a one liner :-)-O el On 2020-12-23 17:59 , Dr Eberhard W Lis

Re: [R] FInd packages in need of Update (like RStudio)

2020-12-23 Thread Dr Eberhard W Lisse
Thank you, but the RFTM suggestion helped me even more :-)-O greetings, el On 2020-12-23 17:06 , Sarah Goslee wrote: > Does update.packages() meet your needs? > > > Sarah > > On Wed, Dec 23, 2020 at 9:39 AM Dr Eberhard W Lisse wrote: >> >> Hi, >> >>

Re: [R] FInd packages in need of Update (like RStudio)

2020-12-23 Thread Dr Eberhard W Lisse
Thanks, update.packages(dependencies = TRUE, ask=FALSE) does what I want. greetings, el On 2020-12-23 17:30 , Deepayan Sarkar wrote: > On Wed, Dec 23, 2020 at 8:09 PM Dr Eberhard W Lisse wrote: >> >> Hi, >> >> does anyone know how one would look which

[R] FInd packages in need of Update (like RStudio)

2020-12-23 Thread Dr Eberhard W Lisse
)-O greetings, el -- Dr. Eberhard W. Lisse \ / Obstetrician & Gynaecologist e...@lisse.na / * | Telephone: +264 81 124 6733 (cell) PO Box 8421 Bachbrecht \ / If this email is signed with GPG/PGP 10007, Namibia ;/ Sect 20 of Act No. 4 of 2019 ma

Re: [R] Subscript and superscript on one symbol; plotmath.

2020-12-09 Thread Dr Eberhard W Lisse
They let you guys go to the pup again? :-)-O el On 09/12/2020 10:06, Rolf Turner wrote: [...] > Is there any way to achieve, with plotmath, an effect like unto that > produced by the LaTeX expression $\sigma^2_{11}$? Or should I just > give up and go to the pub? :-) [...] -- Dr. E

[R] How to understand the mentality behind tidyverse and ggplot2?

2020-11-18 Thread C W
Dear R list, I am an old-school R user. I use apply(), with(), and which() in base package instead of filter(), select(), separate() in Tidyverse. The idea of pipeline (i.e. %>%) my code was foreign to me for a while. It makes the code shorter, but sometimes less readable? With ggplot2, I just do

Re: [R] build a literature database

2020-11-04 Thread Koenker, Roger W
You might also want to take a look at this survey: https://ropensci.org/technotes/2020/05/07/rmd-citations/ > On Nov 4, 2020, at 9:22 AM, John wrote: > > Hi, > > I 'd like to create a table for literature review. Is there any good > data structure (database) I may use? Now I just use a simp

Re: [R] formula mungeing

2020-10-23 Thread Koenker, Roger W
{ > e <- eval(e, list(...)) >} >if (length(e) > 1) for (i in 1:length(e)) e[[i]] <- Recall(e[[i]], ...) >} >e > } > > g(f, lambdas = 2:3) > ## y ~ qss(x, lambda = 2L) + qss(z, 3L) + s > > On Fri, Oct 23, 2020 at 9:33

[R] formula mungeing

2020-10-23 Thread Koenker, Roger W
Suppose I have a formula like this: f <- y ~ qss(x, lambda = lambdas[1]) + qss(z, lambdas[2]) + s I’d like a function, g(lambdas, f) that would take g(c(2,3), f) and produce the new formula: y ~ qss(x, lambda = 2) + qss(z, 3) + s For only two qss terms I have been using

Re: [R] write.csv covert Åland to land

2020-10-20 Thread Dr Eberhard W Lisse
Perhaps ?readr::write_delim() el On 20/10/2020 12:45, Dr Eberhard W Lisse wrote: > Apologies, > > I meant > > ?write.table() > > el > > On 20/10/2020 12:38, Jinsong Zhao wrote: >> On 2020/10/20 17:23, Dr Eberhard W Lisse wrote: >>> ?file.write()

Re: [R] write.csv covert Åland to land

2020-10-20 Thread Dr Eberhard W Lisse
Apologies, I meant ?write.table() el On 20/10/2020 12:38, Jinsong Zhao wrote: > On 2020/10/20 17:23, Dr Eberhard W Lisse wrote: >> ?file.write() >> >> look for fileEncoding? >> >> el >> > > There is no file.write(). I have tried fileEncoding = &

Re: [R] write.csv covert Åland to land

2020-10-20 Thread Dr Eberhard W Lisse
nd more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Dr. Eberhard W. Lisse \ / Obstetrician & Gynaecologist e..

Re: [R] Dplyr question

2020-10-15 Thread Dr Eberhard W Lisse
s :) > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal

Re: [R] jitter-bug? problematic behaviour of the jitter function

2020-09-24 Thread Koenker, Roger W
FWIW, there is a similar function called “dither” in the quantreg package. > On Sep 24, 2020, at 8:08 AM, Martin Keller-Ressel > wrote: > > Dear Duncan, Dear Rui, > > thanks for the responses and for pointing out that it is the ‚fuzz‘ part that > is causing the problem. I agree that this is n

Re: [R] formula wrangling

2020-09-21 Thread Koenker, Roger W
X <- cbind(X, xss[[i]]) # Here is the problem } } > On Sep 21, 2020, at 9:52 AM, Koenker, Roger W wrote: > > I need some help with a formula processing problem that arose from a > seemingly innocuous request > that I add a “subset” argument to the additive m

[R] formula wrangling

2020-09-21 Thread Koenker, Roger W
I need some help with a formula processing problem that arose from a seemingly innocuous request that I add a “subset” argument to the additive modeling function “rqss” in my quantreg package. I’ve tried to boil the relevant code down to something simpler as illustrated below. The formulae in

Re: [R] [External Email] how to generate this kind of graph

2020-07-23 Thread Christopher W Ryan
You might like the beeswarm package. --Chris Ryan SUNY Upstate Medical University and Broome County Health Department On Thu, Jul 23, 2020 at 1:15 AM array chip via R-help wrote: > > Hello everyone, > > I saw this scatterplots from a paper and thought it looked very nice: > > > https://drive.go

[R] challenging data merging/joining problem

2020-07-05 Thread Christopher W. Ryan
I've been conducting relatively simple COVID-19 surveillance for our jurisdiction. We get data on lab test results automatically, and then interview patients to obtain other information, like clinical details. We had been recording all data in our long-time data system (call it dataSystemA). But as

Re: [R] [External Email] R Software Risk Analysis

2020-06-18 Thread Christopher W. Ryan
I use R every day with pretty sensitive data in my county health department. Of course, this is for manipulation and analysis of data pulled from their sources, not for interacting directly with, or updating, patient records in any clinically operational sense. As others have said, the structure an

Re: [R] [External Email] Re: [External] Re: access for free more than 500 essential Springer Nature textbooks

2020-05-22 Thread Christopher W. Ryan
Am I interpreting this offer correctly, that it is for libraries to obtain access to the e-books for free? It does not seem to me that an invididual can download one--am I missing that part? Thanks --Chris Ryan Mark Leeds wrote: > Abby: here's an easier link for seeing what you might like. > >

Re: [R] My dream ...

2020-05-11 Thread Koenker, Roger W
Definitely a fortune: "the advantage of computers is not Artificial Intelligence, but rather Artificial Patience" Greg Snow in response to a question about automated R-analysis. Roger Koenker r.koen...@ucl.ac.uk Honorary Professor of Economics Department of Economics,

[R] CRAN library down? - UPDATE

2020-05-02 Thread Christopher W. Ryan
The message at that URL reads: CRAN mirror restricted to UC Berkeley The CRAN mirror at UC Berkeley's College of Natural Resources is no longer available to off campus users and has been removed from the CRAN mirror list. The load on our server was too much. Berkeley folks can continue to access

Re: [R] [External Email] Re: arranging multiple lattice graphs on a page

2020-04-02 Thread Christopher W. Ryan
aving 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, Apr 2, 2020 at 2:23 PM Christopher W. Ryan > wrote: >> >> I would like to place two se

[R] arranging multiple lattice graphs on a page

2020-04-02 Thread Christopher W. Ryan
I would like to place two separate plots, one above the other, something like this (MWE for illustration): library(lattice) data(iris) layout(matrix(c(1,2), 2, 1, byrow = TRUE)) with(iris, (plot(Sepal.Length ~ Petal.Length))) with(iris, (plot(Sepal.Length ~ Petal.Width))) but with lattice, so one

Re: [R] [External Email] Re: incomplete reading of a large csv file

2020-02-21 Thread Christopher W. Ryan
> On 21.02.2020 20:10, Christopher W. Ryan wrote: >> sessionInfo at end of message. >> >> I have data that I was given as an Excel .xlsx file. It contains 96266 >> lines and 24 columns. I opened it in OpenOffice.org and saved it in .csv >> format, using the pip

[R] incomplete reading of a large csv file

2020-02-21 Thread Christopher W. Ryan
sessionInfo at end of message. I have data that I was given as an Excel .xlsx file. It contains 96266 lines and 24 columns. I opened it in OpenOffice.org and saved it in .csv format, using the pipe character as a field separator. This produced a file with 96266 lines. When I read it into R thusly

Re: [R] [External Email] Help to do this exercise

2020-02-10 Thread Christopher W Ryan
Homework questions are generally frowned upon on R-help List. It is best to discuss those questions with your instructor. --Chris Ryan SUNY Upstate Medical University Clinical Campus at Binghamton On Mon, Feb 10, 2020 at 9:39 AM hương phạm wrote: > N1 Consider the database "LakeHuron" , contain

[R] Which external functions are called in a package? [Solved]

2020-01-08 Thread Hans W Borchers
By using the *pkgapi* package and with quite a bit of manual work I was able to (almost) automatically find all function calls to my package in 150 depending on, importing, or suggesting packages. It took two days to overcome all the obstacles during the process -- and was a very rewarding experien

Re: [R] Fwd: Which external functions are called in a package?

2020-01-03 Thread Hans W Borchers
e reverse dependencies on your packages' CRAN web page. > > On January 3, 2020 1:45:42 PM PST, Hans W Borchers > wrote: > >You are absolutely right. I forgot that there is a difference between > >the unpacked and the installed directory of a package. The > >documentation

[R] Fwd: Which external functions are called in a package?

2020-01-03 Thread Hans W Borchers
You are absolutely right. I forgot that there is a difference between the unpacked and the installed directory of a package. The documentation of the *pkgapi* package in development is quite scarce and does not mention the details. Thanks for the tip. --HW PS: Still I would like to learn about ot

[R] Which external functions are called in a package?

2020-01-03 Thread Hans W Borchers
How can I find out which functions of my package A are called within another package B that depends on, imports, or suggests package A ? And more specifically, which functions in B are calling functions in A ? I tried to utilize the *pkgapi* package, but get error messages like > map_package(

[R] how to change format of dates in a tibble

2019-12-18 Thread Christopher W Ryan
I'm not understanding how the tidyverse handles date formats. output of sessionInfo() at the end of my message. dateRanges <- structure(list(apptType = structure(1:2, .Label = c("initial visit", "start of treatment visit"), class = "factor"), minMadeRequestDates = structure(c(18124, 18115), class

Re: [R] class of 'try' if error is raised

2019-12-15 Thread Hans W Borchers
en mind is that people keep coming along and > sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Sun, Dec 15, 2019 at 6:21 AM Hans W Borchers wrote: >> >> I have been informed by CRAN administrators that th

[R] class of 'try' if error is raised

2019-12-15 Thread Hans W Borchers
I have been informed by CRAN administrators that the development version of R issues warnings for my package(s). Some are easy to mend (such as Internet links not working anymore), but this one I don't know how to avoid: Error in if (class(e) == "try-error") { : the condition has length > 1 I

  1   2   3   4   5   6   7   8   9   10   >