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,

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

2024-04-22 Thread Hans W
tps://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 combinatorics, >> are much easier t

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

2024-04-21 Thread Hans W
. Is there a 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]] __ R-help@r

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.

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: [ESS] emacs theme for polymode with noweb files

2023-12-04 Thread James W. MacDonald via ESS-help
I personally like Dracula mode, although Nord seems pretty nice as well. -Original Message- From: ESS-help On Behalf Of LaurentEss via ESS-help Sent: Sunday, December 3, 2023 5:48 PM To: ess-help@r-project.org Subject: [ESS] emacs theme for polymode with noweb files Dear ESS-list,    

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

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

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

[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

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

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:

Re: [R] Noisy objective functions

2023-08-13 Thread Hans W
quot;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)

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 “ >

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

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

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

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

[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

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

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) %>%

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,

[ESS] When the R window opens, sometimes it is side-by-side with my .Rnw file. I want them one above the other. It seems unpredictable

2022-05-27 Thread Christopher W. Ryan via ESS-help
I'm using Vince Goulet's modified version of emacs 26.2 (build 1, x86_64-w64-mingw32) of 2019-04-13 with ESS, on Windows 10. I use Sweave and LaTeX, so I have my R code in .Rnw files. When I execute my first line of R code, an R buffer opens of course. I prefer it to be below my Rnw buffer.

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

[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

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
e 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-project.

[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 =

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

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 =

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

2021-10-25 Thread Dr Eberhard W Lisse
u 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 for >> the confirmed cases for 2021-10-2

[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

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: >

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

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 *

[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
ow 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 >> To: r

[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

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

2021-03-26 Thread Dr Eberhard W Lisse
t; 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 Eberhard W Lisse wrote: >> Thanks, that is helpful.

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

2021-03-25 Thread Dr Eberhard W Lisse
ny 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(datum, dauer)

[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

Re: [R] Command history

2021-03-01 Thread Dr Eberhard W Lisse
id 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 wher

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

Re: [R] Troubles installing Rcmdr on Mac

2021-01-12 Thread Dr Eberhard W Lisse
, 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 shouldn

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: > >

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’

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
ething 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 6733 (cell) PO B

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 Lisse wrote:

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

[ESS] how to change default emacs behavior, upon running R code, from 2 side-by-by side frames to top-and-bottom frames?

2020-11-09 Thread Christopher W. Ryan via ESS-help
I'm running, on Windows 10, Vince Goulet's version of emacs/ess, which includes GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)  of 2019-08-29 When I execute a line of R code, the R buffer opens up as expected, but it opens in a frame adjacent to the frame containing my source buffer. I would

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

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

[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

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

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

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: > > >

[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

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

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

[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

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

2020-04-02 Thread Christopher W. Ryan
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 separat

[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

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 p

[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

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" ,

[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

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 of

[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

[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 >

[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),

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

2019-12-15 Thread Hans W Borchers
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 the developm

[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

Re: [R] help about codes from probability

2019-11-07 Thread Christopher W. Ryan
Is this homework for a class? If so, it would be better to ask your professor for guidance. R-help List frowns on homework questions. Chris Ryan On November 7, 2019 2:46:32 AM EST, Sadia Seddiqi wrote: >Could you help me how I can solve run this code in R-labUnions > >1-You are picking

[R] how to place a rug on only the x-axis in a scatterplot with lattice

2019-11-05 Thread Christopher W Ryan
The following produces a scatterplot with rugs on both the vertical and horizontal axes. library(dplyr) library(stringr) library(lattice) library(latticeExtra) ## . xyplot(scheduleInterval ~ calledForApptDate, data = dd.2, xlab = "Date patient called for appointment", ylab = "Days in the

[R] getting summary statistics easily with dplyr

2019-11-05 Thread Christopher W Ryan
I'm trying to modernize my way of thinking, and my coding, into the dplyr/tidyverse way of doing things. To get basic summary statistics on a variable in a dataframe, with the output also being a dataframe. I previously would do something like this, using other packages: library(doBy)

[R] reading in csv files, some of which have column names and some of which don't

2019-08-13 Thread Christopher W Ryan
Alas, we spend so much time and energy on data wrangling . . . . I'm given a collection of csv files to work with---"found data". They arose via saving Excel files to csv format. They all have the same column structure, except that some were saved with column names and some were not. I have a

Re: [R] help

2019-07-16 Thread Christopher W Ryan
You will get the best help if you: 1. post email in plain text, not html 2. post the command/code you issued and the result/error that was returned 3. Information about your operating system sometimes helps. --Chris Ryan Binghamton, NY, US On Tue, Jul 16, 2019 at 3:36 PM Sujaya wrote: >

Re: [R] Summary Table for Quantile Regression for Complex Survey

2019-07-16 Thread Koenker, Roger W
try summary(newer, se = “nid”) Roger Koenker r.koen...@ucl.ac.uk Department of Economics, UCL London WC1H 0AX. On Jul 16, 2019, at 2:46 AM, Mavra Ahmed mailto:mavz.ah...@utoronto.ca>> wrote: Hello All, I am running quantile regression for a complex survey

Re: [R] Help installing netReg

2019-04-15 Thread Christopher W. Ryan
Sorry, was typing on my phone. Not "compy." "Computer." I was asking whether you were working on your own, standalone, computer, or whether perhaps this was an institutional, networked, machine, on which you don't have write permissions that you need. --Chris Ryan Spencer Brackett wrote: >

Re: [R] Problems trying to make a time series using NetCDF file

2019-03-16 Thread David W. Pierce
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -

Re: [R] Why is there error in as.POSIXlt.character when using strftime()?

2019-02-03 Thread C W
h Date and POSIXt types > in the same analysis... I recommend sticking with one or the other. > > The trunc.POSIXt function is more appropriate for getting POSIXt dates > than converting to character and back. > > On February 2, 2019 9:03:31 AM PST, C W wrote: > >Also, I

  1   2   3   4   5   6   7   8   9   10   >