Re: [R] is.na(strptime (...)) return TRUE on FreeBSD

2023-05-12 Thread Rasmus Liland
Hi! I ran the code (d <- strptime("1970-01-01 12:00:00 UTC", "%Y-%m-%d %H:%M:%OS", tz = "")) is.na(d) dput(unclass(d)) as.POSIXct(d) (d <- is.na(strptime("1970-01-03 12:00:00 UTC", "%Y-%m-%d %H:%M:%OS", tz = ''))) is.na(d) dput(unclass(d))

Re: [R] seqMK function

2023-04-03 Thread Rasmus Liland
Dear Nick, Looking at dput(pheno::seqMK), dput(pheno::tau), and [1], I think you need to change the function pheno::tau to change the confidence level ... R [1] https://mannkendall.github.io/about.html#application-of-the-seasonal-mann-kendall-test

Re: [R] Trying to learn how to write an "advanced" function

2023-03-16 Thread Rasmus Liland
On 2023-03-16 12:11 +, Sorkin, John wrote: > (1) can someone point me to an > explanation of match.call or match > that can be understood by the > uninitiated? Dear John, the man page ?match tells us that match matches the first vector against the second, and returns a vector of indecie

Re: [R] Write text file in Fortran format

2022-09-21 Thread Rasmus Liland
Dear Javad, Perhaps you were looking to read the table in Air.txt (is this Fortran format?) into R? b <- readLines("Air.txt") # The text MIME attachment w/Mailman footer ... b <- b[1:(which(b=="")-1)] # Remove the odd Mailman footer (at end of df) idx <- max(grep("^

Re: [R] how to add comma to string vector?

2022-06-10 Thread Rasmus Liland
Hello ... raws <- c("field_1", "field_2", "field_3") paste0("['", paste0(raws, collapse="', '"), "']") rasmus@eightforty ~ % python Python 3.10.5 (main, Jun 6 2022, 18:49:26) [GCC 12.1.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ['field_1', 'field_2'

Re: [R] Install OpenCL

2022-06-02 Thread Rasmus Liland
Dear Quirin, To be able to install OpenCL on ArchLinux, I needed to install opencl-headers first, because my system complained about CL/opencl.h ... Maybe there is something like that on Windows ... Best, Rasmus [1] https://archlinux.org/packages/extra/any/opencl-headers/ ___

Re: [R] Restoration of "rite" package of R as R-script editor or the like

2022-05-23 Thread Rasmus Liland
On 2022-05-23 17:37 +0100, Rui Barradas wrote: | And about an editor no one mentinoed, | vim. Hear, hear, +1 for vim 👍🏻 I use vim in st[1], and run Rscript everytime my long script changes using entr[2] Also, ess I think might be good.[3] I was able to install rite locally from github this

Re: [R] .Rdata not loading

2021-12-24 Thread Rasmus Liland
Dear Rich, If you want to look at Rdata-files in a quick way in the terminal, use this little gem in your .zshrc.local: readrdata() { Rscript -e "options(width=$COLUMNS); load('$1'); sapply(ls(), get, simplify=F)" | less } Merry Christmas! Best, Rasmus ___

Re: [R] Script Run Output Capturing

2021-12-23 Thread Rasmus Liland
sink and capture.output seem useful, but I have not used them. I looked into pipe() a long time ago ... __ 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

Re: [R] Script Run Output Capturing

2021-12-23 Thread Rasmus Liland
Dear Stephen, Maybe running R in batch mode is what you're after? E.g. running R CMD BATCH ./process/script-name.r creates ./process/script-name.Rout (or ./process/script-name.rout ?) with output of R commands and inline output, I think stderr (maybe others? Not only stdout like

Re: [R] Sum every n (4) observations by group

2021-12-20 Thread Rasmus Liland
Dear Miluji, I went through different combinations, and find it elegant to sum the values with respect to ID + High/Low Date levels like if this was a list of Dose/Material/Group experiments: x[x$Date %in% c(4143, 4147),"j"] <- tapply(x$Value, paste0(x$ID, ife

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Rasmus Liland
Dear Luigi, Yes, from the named list of dataframes, you access the demographic table like that. You can remove dput() now, I used it only to print the output; read ?dput, it's very handy the next time you ask questions on this list. Take a closer look at my obfuscated code ... To only

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Rasmus Liland
On 2021-11-10 18:55 +0100, Luigi Marongiu wrote: > no, it worked. that table was indeed > empty and you for the right entries on > the other table. I'll try on my > machine, thank you! Cheers man! signature.asc Description: PGP signature __ R-help@r

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Rasmus Liland
Dear Luigi, I tried quoting ... This: odb = ODB::odb.open("proof.odb", jarFile = NULL) dput(sapply(names(ODB::odb.tables(odb)), function(tbl) { sqlQuery <- paste0('SELECT * FROM "', tbl, '"') ODB::odb.read(odb, sqlQuery) }, simplify=F))

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Rasmus Liland
also Note in ?ODB::odb.read says: To query databases built with OpenOffice or LibreOffice, it may be necessary to quote table and/or column names in ‘sqlQuery’, as the default behavior of the HSQL engine is to convert unquoted table and col

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Rasmus Liland
Are you willing to send me a part of the the proof.odb so I can run the query? R signature.asc Description: PGP signature __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] how to connect libreoffice base odb using R package odbc?

2021-11-10 Thread Rasmus Liland
Dear Luigi, I found the package ODB https://cran.r-project.org/web/packages/ODB/ODB.pdf and was able to install it after reconfiguring rJava ... The help page ?ODB::odb.open has this example: odbFile <- tempfile(fileext=".odb") odb.create(odbFile, overwrite="do")

Re: [R] by group

2021-11-01 Thread Rasmus Liland
Dear Val, also consider using reshape2::dcast dat <- structure(list(Year = c(2001L, 2001L, 2001L, 2001L, 2001L, 2001L, 2002L, 2002L, 2002L, 2002L, 2002L, 2002L, 2003L, 2003L, 2003L, 2003L, 2003L, 2003L), Sex = c("M", "M", "M", "F", "F", "F", "M", "M

Re: [R] RSQLite slowness

2021-10-07 Thread Rasmus Liland
Dear Martin Morgan, Thanks for all those links! Yes, my question can be characterized like that I think, traditional way writing a temporary table into the database and left JOINing the others vs. parameterized query. A relevant example would be to first create the database from the compr

Re: [R] RSQLite slowness

2021-10-07 Thread Rasmus Liland
On 2021-10-06 12:11 -0700, Jeff Newmiller wrote: > FWIW all SQL implementations work > better with indexes An index seems to be a good way to improve sql performance, I'll look into it. Best, Rasmus signature.asc Description: PGP signature __ R-hel

Re: [R] RSQLite slowness

2021-10-07 Thread Rasmus Liland
Dear Ivan, Thanks for that explaination! I think it explains the slowness clearly. It is possible to use carray is in Rust [1] so it might be available in R in the future(?) I'll look into rusqlite some time at least. sqlite is supposed to be one of the fastest sql implementations. Realm

Re: [R] RSQLite slowness

2021-10-06 Thread Rasmus Liland
Thank you Bert, I set up a new thread on BioStars [1]. So far, I'm a bit unfamilliar with Bioconductor (but will hopefully attend a course about it in November, which I'm kinda hyped about), other than installing and updating R packages using BiocManager Did you think of something els

[R] RSQLite slowness

2021-10-06 Thread Rasmus Liland
Dear r-help readers, why is it so much slower to query an sqlite database using RSQlite «from the outside» using param like statement <- "SELECT * FROM gene2refseq LEFT JOIN gene_info ON gene_info.GeneID = gene2refseq.GeneID WHERE gene2refseq.`R

Re: [R] Error: ignoring SIGPIPE signal

2021-03-16 Thread Rasmus Liland
Hello there, This error happens if you did not finish reading from the pipe. E.g. I have this function in my local zshrc, to read tsv files with less in terminal width ... readdelim() { Rscript -e "options(width=$COLUMNS); read.delim('$1', check.names=FALSE, na='N/A')" | less } ..

Re: [R] [External] Re: [External] Re: Help please

2021-03-11 Thread Rasmus Liland
That is such a nice email crammed with useful info I'm sure Areti Panopoulou appreciates. JR signature.asc Description: PGP signature __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] [External] Re: Help please

2021-03-11 Thread Rasmus Liland
Dear Areti, this dcast data.frame presents the same info as Jim's barplot reshape2::dcast(data=scrounging, formula=behav~substr, fun.aggregate=length) yielding behav air ground tree vine 1 active 5 433 2 foraging 2 134

Re: [R] Color in stripchart

2021-03-11 Thread Rasmus Liland
Good for you! __ 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, r

Re: [R] Color in stripchart

2021-03-10 Thread Rasmus Liland
Hello there again, Sorry, I missed that part in the middle about set.seed. As per [1], you need to run stripchart again with the add argument set to TRUE, and slicing the df according to the color, like so set.seed(20210310) years <- sample(x=seq(2011, 2018), size = 365*8, re

Re: [R] Color in stripchart

2021-03-10 Thread Rasmus Liland
Dear Robin and Gerrit, I am unable to see the difference in the plot in the two cases ... df <- data.frame(year = seq(2011, 2018), value = seq(10, 80, 10)) df$color <- 'black' df[df$value<33,]$color <- 'blue' df[df$value>66,]$color <- 'red' file

Re: [R] Extract data from .nc file

2021-03-09 Thread Rasmus Liland
Dear Shailendra and Roy, Yes, the info ncvar_get retrieves is of different lengths. soi_final does not have a time variable for the x axis, and tt is a integer vector int [1:2001(1d)] 0 365 730 1095 1460 1825 2190 2555 2920 3285 ... The file is a HDF5 file: rasmus@twosixty ~ % file

Re: [R] Changing chart border's color

2021-03-09 Thread Rasmus Liland
Right, adding a black border around a plot in R is meaningless. There is also another circular plot being created everytime FactoMineR::PCA runs. It might be (perhaps, idk) fruitful for you to look at the contents of res.pca using str and create the PCA plot yourself using ggplot2 ...

Re: [R] Changing chart border's color

2021-03-09 Thread Rasmus Liland
Please add test.csv using dput 🙃 __ 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] poLCA problem

2021-03-09 Thread Rasmus Liland
Dear Scott, I think the issue here is you need to form a correct formula poLCA::poLCA can accept. The help page ?poLCA::election has this example: # Latent class models with one (loglinear independence) to three classes data(election) f <- cbind(MORALG,CARESG,KNOWG,LEA

Re: [R] Changing chart border's color

2021-03-09 Thread Rasmus Liland
Hi, it would be useful to know how you created res.pca. https://rdrr.io/r/graphics/box.html Rasmus signature.asc Description: PGP signature __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/

Re: [R] Plot_ly bar plots - bars span sevral x values when there are missing values.

2021-03-09 Thread Rasmus Liland
Dear Nevil, Although I am a bit unfamiliar with plotly, it seems it is possible to plot two bars side by side at least: h <- df[3:4,] p <- plotly::plot_ly( data = h, x = ~ x, y = ~ y, type = "bar") p <- plotly::layout(p=p,

Re: [R] Split Dataframe into several

2021-03-08 Thread Rasmus Liland
On 2021-03-08 17:14 +0330, javad bayat wrote: > Dear Rasmus; > Many thanks. It works for me. > Sincerely yours Great :) signature.asc Description: PGP signature __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/m

Re: [R] Split Dataframe into several

2021-03-08 Thread Rasmus Liland
Dear Javad, data <- "Date Cases Country 2020-12-14 746 Country1 2020-12-15 324 Country1 2020-12-15 1 Country3 2020-12-13 298 Country2" data <- read.table(text=data, header=T) x <- reshape( data=data, timevar = "Country",

Re: [R] Monospaced font not shown correctly (Xubuntu 20.04)

2021-01-20 Thread Rasmus Liland
On 2021-01-20 12:29 +0100, Wolfgang Viechtbauer wrote: > > That looks like a more elegant solution, not requiring hardcoding paths. > Thanks for the suggestion! Thanks, no problem R __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] Monospaced font not shown correctly (Xubuntu 20.04)

2021-01-20 Thread Rasmus Liland
On 2021-01-20 09:45 +, Viechtbauer, Wolfgang (SP) wrote: > And to conclude this little saga (that nobody is probably reading, but at > least then there is a solution in the archives): > > Adding the following to ~/.config/fontconfig/fonts.conf worked for me: > > > > > > >

Re: [R] text analysis errors

2021-01-07 Thread Rasmus Liland
On 2021-01-07 11:34 +1100, Jim Lemon wrote: > On Thu, Jan 7, 2021 at 10:40 AM Gordon Ballingrud > wrote: > > > > Hello all, > > > > I have asked this question on many forums without response. And although > > I've made progress myself, I am stuck as to how to respond to a particular > > error mess

Re: [R] (no subject)

2020-12-11 Thread Rasmus Liland
On 2020-12-12 01:14 +0500, Anas Jamshed wrote: > On Sat, Dec 12, 2020 at 1:12 AM Rasmus Liland wrote: > > > > Anas Jamshed, > > > > I do not need to explain why I am tired > > at all. Not at all. > > but plz try to help me Once upon a midnight dreary, whil

Re: [R] (no subject)

2020-12-11 Thread Rasmus Liland
On 2020-12-11 22:19 +0500, Anas Jamshed wrote: > On Fri, Dec 11, 2020 at 10:17 PM Rasmus Liland wrote: > > > > Sorry, I think I am too tired atm. I > > took this pneumonia vaccine, and it > > really banged me up you know ... > > > > Maybe someone

Re: [R] (no subject)

2020-12-11 Thread Rasmus Liland
On 2020-12-11 22:09 +0500, Anas Jamshed wrote: > On Fri, Dec 11, 2020 at 9:51 PM Rasmus Liland wrote: > > > > Say, how do I create fit3, eset, design, > > etc. ... > > > > R > > library(oligo) > if (!requireNamespace("BiocManager", quietly = TR

Re: [R] (no subject)

2020-12-11 Thread Rasmus Liland
On 2020-12-11 21:04 +0500, Anas Jamshed wrote: > On Fri, Dec 11, 2020 at 9:03 PM Anas Jamshed wrote: > > On Fri, Dec 11, 2020 at 8:37 PM Rasmus Liland wrote: > > > > > > I think that's too many unspecific lines > > > and too large files directly here on &g

Re: [R] (no subject)

2020-12-11 Thread Rasmus Liland
On 2020-12-11 20:14 +0500, Anas Jamshed wrote: > On Fri, Dec 11, 2020 at 7:49 PM Rasmus Liland wrote: > > > On 2020-12-11 19:16 +0500, Anas Jamshed wrote: > > > On Fri, Dec 11, 2020 at 6:37 PM Rasmus Liland wrote: > > > > On 2020-12-1

Re: [R] (no subject)

2020-12-11 Thread Rasmus Liland
On 2020-12-11 19:16 +0500, Anas Jamshed wrote: > On Fri, Dec 11, 2020 at 6:37 PM Rasmus Liland wrote: > > On 2020-12-11 18:08 +0500, Anas Jamshed wrote: > > > > > > > Anas Jamshed, > > > > I found this > > > > https://support.bioconductor.or

Re: [R] (no subject)

2020-12-11 Thread Rasmus Liland
; It gives me the error : > > Error in model.frame.default(object, data, xlev = xlev) : > invalid type (closure) for variable 'conditions' Anas Jamshed, I found this https://support.bioconductor.org/p/130817/ maybe it helps ... Best, Rasmus Liland _

Re: [R] how to overlay two histograms

2020-09-17 Thread Rasmus Liland
On 2020-09-17 17:01 -0500, Ana Marija wrote: > Hello, > > I am trying to overlay two histograms with this: > > p <- ggplot(d, aes(CHR, counts, fill = name)) + geom_bar(position = "dodge") > p > > but I am getting this error: > Error: stat_count() can only have an x or y aesthetic. > Run `rlang::

Re: [R] Assigning cores

2020-09-03 Thread Rasmus Liland
On 2020-09-03 13:44 -0400, Leslie Rutkowski wrote: > Hi all, > > I'm working on a large simulation and > I'm using the doParallel package to > parallelize my work. I have 20 cores > on my machine and would like to > preserve some for day-to-day > activities - word processing, sending > email

Re: [R] System Requirements

2020-08-22 Thread Rasmus Liland
Dear Mike, On 2020-08-22 11:50 -0400, Patrick (Malone Quantitative) wrote: | On Sat, Aug 22, 2020 at 11:44 AM Firpo, Mike wrote: | | | | Hello, | | | | Reading the FAQ, I'm confused about | | whether R 4.0.2 is tested on Windows | | 7. I found the following: | | | | | 2.24 Does R run under Win

Re: [R] Export R outputs to SAS dataset

2020-08-22 Thread Rasmus Liland
On 2020-08-22 08:17 +0530, Jomy Jose wrote: | Hi | I was able to run R code via PROC IML | in SAS,so is there any way to export | the generated outputs to SAS datasets | since the R outputs don't follow data | frame structure. Dear Jomy, But perhaps you can take the outputs in SAS and work o

Re: [R] filter() question

2020-08-21 Thread Rasmus Liland
On 2020-08-21 13:45 +0200, Dr Eberhard Lisse wrote: | | Eric, Rasmus, | | thank you very much, | |ALLPAP %>% |group_by(Provider) %>% |mutate( minDt=min(CollectionDate), |maxDt=max(CollectionDate)) %>% |summarize( mi

Re: [R] filter() question

2020-08-21 Thread Rasmus Liland
On 2020-08-21 09:03 +0200, Dr Eberhard Lisse wrote: > Hi, > > I have a small test sample with lab > reports (PAP smears) from a number of > different providers. These have > Collection Dates and the relevant > columns glimpse() something like > this: > > $ Provider"Dr C", "Dr D", "D

Re: [R] Rotation Forest Error Message

2020-08-21 Thread Rasmus Liland
On 2020-08-21 16:22 +1200, Abby Spurdle wrote: | On Fri, Aug 21, 2020 at 4:16 PM Abby Spurdle wrote: | | On Fri, Aug 21, 2020 at 1:06 PM Sparks, John wrote: | | | | | | Hi R Helpers, | | | | | | I wanted to try the rotationForest | | | package. | | | | | | I pointed it at my data set and | | |

Re: [R] Trouble getting labels for bars in Pareto Chart

2020-08-19 Thread Rasmus Liland
Dear Paul, I answer inline: On 2020-08-19 16:27 -0500, Paul Bernal wrote: | | I tried using the function | pareto.chart from the qcc package, but | the names of the columns in the pareto | chart are some codes What codes? Can you please elaborate on this? | that do not match the school n

Re: [R] & and |

2020-08-19 Thread Rasmus Liland
On Wed, Aug 19, 2020 at 7:53 AM Ivan Calandra wrote: | | I have the following vector: | mydata <- | c("SSFA-ConfoMap_GuineaPigs_NMPfilled.csv", | "SSFA-ConfoMap_Lithics_NMPfilled.csv", | "SSFA-ConfoMap_Sheeps_NMPfilled.csv", | "SSFA-Toothfrax_GuineaPigs.xlsx", |

Re: [R] R Script Modification Questions

2020-08-19 Thread Rasmus Liland
Dear Stephen, I answer inline: On 2020-08-19 12:57 +1000, Jim Lemon wrote: | On Wed, Aug 19, 2020 at 3:09 AM Stephen P. Molnar wrote: | | | | What I would like to do is use | | linetype, rather than color, in line | | 27. You need to specify linetype instead of color in ggplot::aes, like so

Re: [R] R Script Modification Questions

2020-08-18 Thread Rasmus Liland
Dear Stephen, I reply you inline: On 2020-08-18 11:09 -0700, Bert Gunter wrote: | On Tue, Aug 18, 2020 at 10:10 AM Stephen P. Molnar wrote: | | | | Thanks to the kind folks on this | | list, this is an elegant replacement | | for the clumsy R script that I that | | I wrote. | | | | | | | |

Re: [R] an error message in getNOAA.bathy function

2020-08-18 Thread Rasmus Liland
On 2020-08-18 16:36 +0200, Rasmus Liland wrote: > On 2020-08-18 22:59 +0900, Joon-Taek Yoo wrote: > | Dear Helpers, > | I am trying to draw a map of East Asia > | using the getNOAA.bathy () > | function(package marmap) in R. I'v got > | a following error message. > |

Re: [R] an error message in getNOAA.bathy function

2020-08-18 Thread Rasmus Liland
On 2020-08-18 22:59 +0900, Joon-Taek Yoo wrote: | Dear Helpers, | I am trying to draw a map of East Asia | using the getNOAA.bathy () | function(package marmap) in R. I'v got | a following error message. | | > dat <- getNOAA.bathy(110, 160, 20, 60, res=4, keep=T) | Querying NOAA database ... |

Re: [R] Plot math symbol with string and number

2020-08-18 Thread Rasmus Liland
On 2020-08-18 11:02 +1200, Paul Murrell wrote: | On 18/08/20 9:54 am, Bert Gunter wrote: | | On Mon, Aug 17, 2020 at 2:14 PM wrote: | | | | | | Plotmath seems to be the right way | | | to do it. But without reading | | | plotmath I'd have gone with this: | | | | | | plot(y, main=paste("data",

Re: [R] Best settings for RStudio video recording?

2020-08-18 Thread Rasmus Liland
On 2020-08-17 14:50 -0400, Duncan Murdoch wrote: | | Certainly you should be able to delete | Pandoc if you have permissions to | install it; that may break RMarkdown | if you don't have another copy | somewhere.) I use Rmarkdown outside of Rstudio, just with rmarkdown::render in an Rscript

Re: [R] Plot math symbol with string and number

2020-08-17 Thread Rasmus Liland
On 2020-08-17 22:14 +0100, cpolw...@chemo.org.uk wrote: | On 2020-08-17 03:13, Rasmus Liland wrote: | | On Sun, Aug 16, 2020 at 3:18 PM Bert wrote: | | | | | | ?plotmath | | | | Dear John, read ?plotmath, it is | | good, I was not aware of its | | existence; then backquote s like | | so

Re: [R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread Rasmus Liland
On 2020-08-17 10:09 -0700, Bert Gunter wrote: | On Mon, Aug 17, 2020 at 9:53 AM Rasmus Liland wrote: | | | | Also, stack is also possible to use: | | | | tab <- structure(list( | | date = c("2019M08", "2019M09", "2019M10"), | | down = c(0.01709827, 0.

Re: [R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread Rasmus Liland
Dear John, Op ma 17 aug. 2020 om 09:52 schreef Eric Berger: | On Mon, Aug 17, 2020 at 10:49 AM Thierry Onkelinx wrote: | | | | You are looking for tidyr::pivot_longer() | | Alternatively, melt() from the reshape2 package. | | library(reshape2) | melt(x,id.vars="date",measure.vars=c("down","uc","up

Re: [R] Plot math symbol with string and number

2020-08-16 Thread Rasmus Liland
On Sun, Aug 16, 2020 at 3:18 PM Bert wrote: | On Sun, Aug 16, 2020, 14:53 John wrote: | | | | I would like to make plots with | | titles for different data sets and | | different parameters. The first | | title doesn't show sigma as a math | | symbol, while the second one | | doesn't contain

Re: [R] Hot Air Balloon Weather Briefings

2020-08-14 Thread Rasmus Liland
On 2020-08-14 15:56 -0700, Bert Gunter wrote: | On Fri, Aug 14, 2020 at 3:21 PM Rasmus Liland wrote: | | | | As to Bert's reply, I am a loss as | | how to use the lengths list in | | rle(rap$Speed) for this ... | | I showed how in my message for one | interpretation of the query. I

Re: [R] Hot Air Balloon Weather Briefings

2020-08-14 Thread Rasmus Liland
On 2020-08-14 13:58 -0700, Philip wrote: | I’m trying to compare National Weather | Service Rapid Update Forecast (RAP) | data to GPS breadcrumbs collected by a | really clever Apple Phone Ap that lays | down longitude, latitude, altitude, | compass direction, and speed every six | seconds.

Re: [R] Arrange data

2020-08-03 Thread Rasmus Liland
On 2020-08-03 21:11 +1000, Jim Lemon wrote: > On Mon, Aug 3, 2020 at 8:52 PM Md. Moyazzem Hossain > wrote: > > > > Hi, > > > > I have a dataset having monthly > > observations (from January to > > December) over a period of time like > > (2000 to 2018). Now, I am trying to > > take an average

Re: [R] Parsing a Date

2020-08-02 Thread Rasmus Liland
On 2020-08-02 09:24 -0700, Philip wrote: | Below is some Weather Service data. I | would like to parse the forecast date | field into four different columns: | Year, Month, Day, Hour Dear Philip, I'm largely re-iterating Eric and Jeff's excellent solutions: > dat <- structure(list(f

Re: [R] RNA Seq Analysis in R

2020-08-01 Thread Rasmus Liland
On 2020-08-01 15:52 -0400, Matthew McCormack wrote: | On 8/1/20 1:13 PM, Jeff Newmiller wrote: | | On August 1, 2020 4:01:08 AM PDT, Anas Jamshed wrote: | | | I performed this in GEO2R and find | | | R script there and Runs R script Anas, how did you come up with this script at all by reading t

Re: [R] hist from a list

2020-07-31 Thread Rasmus Liland
On 2020-07-31 10:07 -0500, Joshua Ulrich wrote: | On Fri, Jul 31, 2020 at 9:55 AM Rui Barradas wrote: | | Às 15:44 de 31/07/2020, Michael Dewey escreveu: | | | Dear Pedro | | | | | | Some comments in-line | | | | | | On 30/07/2020 21:16, Pedro páramo wrote: | | | | Hi all, | | | | | | | | I attach

Re: [R] adding new level with new values and transpose the dataframe

2020-07-30 Thread Rasmus Liland
On 2020-07-30 18:07 +0300, Engin Yılmaz wrote: | El jueves, 30 de julio de 2020, Rasmus Liland escribió: | | On 2020-07-30 21:13 +1000, Jim Lemon wrote: | | | On Thu, Jul 30, 2020 at 8:33 PM Engin Yılmaz wrote: | | | | | | | | I have 3 different factors for every | | | | month in my dataframe.The

Re: [R] adding new level with new values and transpose the dataframe

2020-07-30 Thread Rasmus Liland
Hi Engin, On 2020-07-30 21:13 +1000, Jim Lemon wrote: | On Thu, Jul 30, 2020 at 8:33 PM Engin Yılmaz wrote: | | | | I have 3 different factors for every | | month in my dataframe.The column of | | classification description has 3 | | factors. | | | | Question 1: | | I need to add a new factor t

Re: [R] Accessing the C++ source associated with the rgl function shade3d

2020-07-30 Thread Rasmus Liland
On 2020-07-30 05:23 -0400, Duncan Murdoch wrote: > On 29/07/2020 7:27 p.m., Rasmus Liland wrote: > > On 2020-07-29 18:04 -0400, Duncan Murdoch wrote: > > > The arrow3d function is also a pure R > > > function, but not a generic. You can > > > see the source b

Re: [R] Accessing the C++ source associated with the rgl function shade3d

2020-07-29 Thread Rasmus Liland
Dear Byron, On 2020-07-29 18:04 -0400, Duncan Murdoch wrote: > The arrow3d function is also a pure R > function, but not a generic. You can > see the source by typing "arrow3d". ... but if I type rgl::shade3d, I get > rgl::shade3d function (x, ...) UseMethod("shade3d")

Re: [R] Help with read.csv.sql()

2020-07-29 Thread Rasmus Liland
On 2020-07-29 22:56 +0200, Ulrik Stervbo wrote: > So, 50% on topic :-) I guess so haha :-) Still I hope this is useful for H , others, or he solved it but still no bottom line volatile situation open for new ideas. __ R-help@r-project.org mailing l

Re: [R] Help with read.csv.sql()

2020-07-29 Thread Rasmus Liland
Dear Ulrik, On 2020-07-29 17:14 +0200, Ulrik Stervbo via R-help wrote: > library(readr) > read_csv( This thread was about sqldf::read.csv.sql ... What is the purpose of bringing up readr::read_csv? I am unfamilliar with it, so it might be a good one. Best, Rasmus signature.asc Descriptio

Re: [R] R Subset by Factor levels

2020-07-29 Thread Rasmus Liland
Dear Engin, On 2020-07-29 16:57 +0300, Engin Yılmaz wrote: > Dear > > I try to create a new subset from my dataframe. > My dataframe's name is m1. > "Classification Description" column has 15 different factors. > The following code is used creating a subset for 1 factor. > m2<-m1[m1$`Classificati

[R] Bottom posting v top posting. Was: Arranging ggplot2 objects with ggplotGrob()

2020-07-28 Thread Rasmus Liland
This email thread has some seriously long messages in it, e.g. one is 243 lines long (i.e. 11K of plain text for something which could have been the size of a Post-It note), and people do not agree if top posting or bottom posting is, also this mime element gets attached by GNU Mailman to ea

Re: [R] Removing a space from a string

2020-07-28 Thread Rasmus Liland
On 2020-07-28 23:00 +0200, Rasmus Liland wrote: | | Perhaps by using gregexpr to look for | dots, remove spaces from the substring until the first | finding, then pasting it back. | | strings <- | c("STRING 01. Remainder of the string.", | "STR ING 01.

Re: [R] Removing a space from a string

2020-07-28 Thread Rasmus Liland
Dear Dennis, On 2020-07-28 13:20 -0700, Dennis Fisher wrote: | Colleagues | | I have strings that contain a space in | an unexpected location. The intended | string is: | “STRING 01. Remainder of the string" | However, variants are: | “STR ING 01. Remainder of the string" |

Re: [R] Nonlinear logistic regression fitting

2020-07-28 Thread Rasmus Liland
Dear Sebastien, On 2020-07-28 14:13 +, Sebastien Bihorel wrote: | Hi | | I need to fit a logistic regression | model using a saturable | Michaelis-Menten function of my | predictor x. The likelihood could be | expressed as: | | L = intercept + emax * x / (EC50+x) | | Which I guess coul

Re: [R] Fine-Grey test

2020-07-27 Thread Rasmus Liland
Dear Mariano, On 2020-07-27 16:00 +, mariano berro wrote: > My name is Mariano Berro. I am a > hematologist from Argentina. > I usually use R for most of my > statistical analysis, but I cannot > find the way of performing the > Fine-Grey analysis with categorical > variables (more than t

Re: [R] Axis with inverse logarithmic scale

2020-07-27 Thread Rasmus Liland
Dear Dileepkumar R, On 2020-07-27 19:13 +0530, Dileepkumar R wrote: | Dear All, | | I want to plot a simple cumulative | probability distribution graph with | like the attached screenshot. The screenshot disappeared somewhere. Perhaps you can try to upload it somewhere, or attach it as a pn

Re: [R] A question about optim function in R

2020-07-26 Thread Rasmus Liland
Dear Zixuan, On 2020-07-26 07:36 -0700, Jeff Newmiller wrote: > On July 26, 2020 7:33:32 AM PDT, Zixuan Qi wrote: > > Hi, > > > > I encounter a problem in R. My program is as follows. > > lower <- c(-Inf, -Inf, -Inf, -Inf, 0, 0, 0, -1, -1, -1) > > upper <- c(Inf, Inf, Inf, Inf, Inf, Inf, Inf, 1,

Re: [R] One year return not year to date

2020-07-26 Thread Rasmus Liland
Hello, On 2020-07-25 20:05 +0100, Rui Barradas wrote: > Às 19:06 de 25/07/2020, Bert Gunter escreveu: > > On Sat, Jul 25, 2020 at 8:41 AM Pedro páramo wrote: > > > Hi all, > > > > > > I want to calculate interanual > > > (not year to date) variation of a > > > stock, I am able to obtain year t

Re: [R] [External] Re: help with web scraping

2020-07-26 Thread Rasmus Liland
Dear William Michels, On 2020-07-25 10:58 -0700, William Michels wrote: > > Dear Spencer Graves (and Rasmus Liland), > > I've had some luck just using gsub() > to alter the offending "" > characters, appending a "___" tag at > each instance of &

Re: [R] [External] Re: help with web scraping

2020-07-26 Thread Rasmus Liland
Dear GRAVES et al., On 2020-07-25 12:43 -0500, Spencer Graves wrote: > Dear Rasmus Liland et al.: > > On 2020-07-25 11:30, Rasmus Liland wrote: > > On 2020-07-25 09:56 -0500, Spencer Graves wrote: > > > Dear Rasmus et al.: > > > > It is LILAND et al., is

Re: [R] [External] Re: help with web scraping

2020-07-25 Thread Rasmus Liland
in there, isn't it? ... right, moving on: On 2020-07-25 04:10, Rasmus Liland wrote: > > ? It might be a better idea to write the reply in plain-text utf-8 or at least Western or Eastern-European ISO euro encoding instead of us-ascii (maybe KOI8, ¯\_(ツ)_/¯) ... something in you

Re: [R] Error in Rose Method (class balancing)

2020-07-25 Thread Rasmus Liland
On 2020-07-23 13:10 -0700, Jeff Newmiller wrote: > > I would recommend trying to use dput() > to remove the need for the file Awesome! I've been looking for dput() for a long time. Thank you! signature.asc Description: PGP signature __ R-help@r-p

Re: [R] prevent XML::readHTMLTable from suppressing

2020-07-25 Thread Rasmus Liland
On 2020-07-24 22:59 -0500, Spencer Graves wrote: > Hello, All: > > Thanks to Rasmus Liland, William > Michels, and Luke Tierney with my > earlier web scraping question.  With > their help, I've made progress.  > Sadly, I still have a problem:  One > field has &q

Re: [R] curl options?

2020-07-25 Thread Rasmus Liland
On 2020-07-24 13:34 -0700, Roy Mendelssohn - NOAA Federal wrote: | On Jul 24, 2020, at 1:21 PM, Roy Mendelssohn - NOAA Federal wrote: | | On Jul 23, 2020, at 4:20 PM, Rasmus Liland wrote: | | | On 2020-07-23 14:56 -0700, Roy Mendelssohn - NOAA Federal via R-help wrote: | | | | I am trying to

Re: [R] [External] Re: help with web scraping

2020-07-25 Thread Rasmus Liland
On 2020-07-24 10:28 -0500, Spencer Graves wrote: > Dear Rasmus: > > > Dear Spencer, > > > > I unified the party tables after the > > first summary table like this: > > > > url <- > > "https://s1.sos.mo.gov/CandidatesOnWeb/DisplayCandidatesPlacement.aspx?ElectionCode=750004975"; > > M_sos

Re: [R] [External] Re: help with web scraping

2020-07-24 Thread Rasmus Liland
On 2020-07-24 08:20 -0500, luke-tier...@uiowa.edu wrote: > On Fri, 24 Jul 2020, Spencer Graves wrote: > > On 2020-07-23 17:46, William Michels wrote: > > > On Thu, Jul 23, 2020 at 2:55 PM Spencer Graves > > > wrote: > > > > Hello, All: > > > > > > > > I've failed with multiple > > > > attempts t

Re: [R] by function with sum does not give what is expected from by function with print

2020-07-23 Thread Rasmus Liland
On 2020-07-24 01:48 +0200, Rasmus Liland wrote: > aggregate(x=list("values"=mydata$values), > by=list("sex"=mydata$sex, > "status"=mydata$status), > FUN=sum) > > yields > >

Re: [R] [External] Re: Playing a music file in R

2020-07-23 Thread Rasmus Liland
On 2020-07-23 16:25 -0700, Henrik Bengtsson wrote: > FWIW, see also the 'midi' R package > (https://github.com/moodymudskipper/midi). > It's not on CRAN. /Henrik Interesting! I tried to play the midi running these lines, but failed: > mid <- midi::midi$new(file.path(find.package("mi

Re: [R] by function with sum does not give what is expected from by function with print

2020-07-23 Thread Rasmus Liland
On 2020-07-23 18:54 -0400, Duncan Murdoch wrote: > On 23/07/2020 6:15 p.m., Sorkin, John wrote: > > Colleagues, > > The by function in the R program below is not giving me the sums > > I expect to see, viz., > > 382+170=552 > > 4730+170=4900 > > 5+6=11 > > 199+25=224 > > ###

Re: [R] curl options?

2020-07-23 Thread Rasmus Liland
On 2020-07-23 14:56 -0700, Roy Mendelssohn - NOAA Federal via R-help wrote: > I am trying to get the following command to work: > > > sshInfo <- rerddap::info('hawaii_soest_f75b_adc6_12ab', url = > > 'https://apdrc.soest.hawaii.edu/erddap/') > > On a Mac at least (but I know for a > fact not n

Re: [R] [External] Re: Playing a music file in R

2020-07-23 Thread Rasmus Liland
On 2020-07-23 14:19 -0400, Richard M. Heiberger wrote: > On Thu, Jul 23, 2020 at 7:21 AM bretschr wrote: > > > > Dear Vahid, > > > > > > Re: > > > > > I have a question regarding the > > > following code: > > > setWavPlayer("/Library/Frameworks/R.framework/Versions/3.6/Resources/bin/play") > > >

  1   2   >