Re: [R] RINLA

2021-06-09 Thread David Winsemius
On 6/9/21 8:48 PM, peri He wrote: Dear Friends, I am running a simple code for rinla. The INLA package is installed successfully on Rstudio. Techinically, the package is installed in an R library. You are using Rstudio as your IDE, but it does not run packages. But when I run inla (y~

[R] RINLA

2021-06-09 Thread peri He
Dear Friends, I am running a simple code for rinla. The INLA package is installed successfully on Rstudio. But when I run inla (y~x,..) function, I get the following error: could not find function "inla" Did anybody have the same problem before? I would appreciate it if any information is

Re: [R] Merging multiple .csv files into one dataframe

2021-06-09 Thread Jeff Newmiller
Attachments have been stripped by the mailing list. Read the Posting Guide. Also, English can help, but R code can be ever so much more clear in indicating what you have to work with and even what you want out of the broken/missing part of your code. https://cran.r-project.org/web/packages/repr

Re: [R] Merging multiple .csv files into one dataframe

2021-06-09 Thread Bert Gunter
I really think you need to create a simple reprex to show us what you want to do. In doing so, you may figure out how to get what you want. I suspect you may also need to spend some more time learning R -- following rote examples can be a fool's errand if you don't know the basics. Bert Gunter "T

Re: [R] Need help to fix the max date filter problem in the date input

2021-06-09 Thread David Winsemius
On 6/9/21 5:06 AM, Biplab Nayak wrote: Hi Greg, Please find the objective of the code(bold) and code mentioned below. I was trying to do to achieve the below objective but somehow it's not working. The phrase "somehow not working" is not a useful description of an outcome. 1.Order assess

Re: [R] Need help to fix the max date filter problem in the date input

2021-06-09 Thread Jeff Newmiller
You seem to need to educate yourself as to what "plain text" means, and to read the Posting Guide for this mailing list. Word documents are very definitely NOT plain text. Stop attempting to communicate via formatted text on this mailing list. For security reasons this mailing list removes most

[R] Merging multiple .csv files into one dataframe

2021-06-09 Thread Esthi Erickson
Hi, I am trying to merge columns from four different .csv files into one dataframe. I am trying to do something like this https://statisticsglobe.com/merge-csv-files-in-r . I am taking long format .csv files, 1 being the base file (testing-long.csv) which I change to wide format first and the thre

Re: [R] aggregation of irregular interval time-series

2021-06-09 Thread Bert Gunter
I have *not* followed this in any detail, but this line seems wrong: arvaia_catture_order <- arvaia_catture[order(arvaia_catture$tempo)] Perhaps it should be: arvaia_catture_order <- arvaia_catture[order(arvaia_catture$tempo), ] ## note the comma! If I am mistaken, just ignore and move on. Chee

Re: [R] aggregation of irregular interval time-series

2021-06-09 Thread Rui Barradas
Hello, I'm not getting your simple sum: arvaia_catture_order[, week := as.integer(format(tempo, "%U"))] aggregate(catture ~ week, arvaia_catture_order, sum) # week catture #1 19 15 #2 20 5 #3 21 78 #4 22 120 Can you explain your result better? Hope this helps, R

Re: [R] Read fst files

2021-06-09 Thread Jeff Reichman
Bill So I understand that’s just unzipping the file to a temporary dir which then would allow read_fst to access the file directly . Jeff From: Bill Dunlap Sent: Wednesday, June 9, 2021 1:43 PM To: reichm...@sbcglobal.net Cc: Jan van der Laan ; r-help@r-project.org Subject: Re: [R] R

[R] aggregation of irregular interval time-series

2021-06-09 Thread Enrico Gabrielli
Hello I just registered on the list. I am an agricultural technician and I am collaborating on a research project on agroforestry and Brown Marmorated Stink Bug (Halyomorpha halys, abbreviated BMSB). Through kobotoolbox we are collecting data of catches in traps on farms. Farms register inconsiste

Re: [R] Need help to fix the max date filter problem in the date input

2021-06-09 Thread Biplab Nayak
Hi Greg, Please find the objective of the code(bold) and code mentioned below. I was trying to do to achieve the below objective but somehow it's not working. 1.Order assessment based on the latest due date so select input automatically shows the order of assessment name. 2.Filter based on the o

Re: [R] Need help to fix the max date filter problem in the date input

2021-06-09 Thread Biplab Nayak
Hi Greg, Please find the objective of the code(bold) and code mentioned below. I was trying to do to achieve the below objective but somehow it's not working. 1.Order assessment based on the latest due date so select input automatically shows the order of assessment name. 2.Filter based on the o

[R] [R-pkgs] New CRAN Package: NGLVieweR - Interactive 3D Visualization of Molecular Structures

2021-06-09 Thread Niels van der Velden
Dear all, I am happy to announce that {NGLVieweR} v1.3.1 is now on CRAN. {NGLVieweR} provides an 'htmlwidgets' https://www.htmlwidgets.org/ interface to 'NGL.js' http://nglviewer.org/ngl/api/. {NGLVieweR} can be used to visualize and interact with protein databank (PDB) and structural files in R

Re: [R] Need help to fix the max date filter problem in the date input

2021-06-09 Thread Biplab Nayak
Hi Greg, Please find the R Code in the word file attached here. Its plain text format Thanks & Regards Biplab Nayak On Wed, Jun 9, 2021 at 12:15 AM Greg Minshall wrote: > Biplab, > > i'm not sure how to help you here, but this list pretty much runs on > plain ASCII (or, these days, utf-8) e-ma

Re: [R] Read fst files

2021-06-09 Thread Duncan Murdoch
On 09/06/2021 1:55 p.m., Jan van der Laan wrote: read_fst is from the package fst. The fileformat fst uses is a binary format designed to be fast readable. It is a column oriented format and compressed. So, to be able to work fst needs access to the file itself and wont accept a file connectio

Re: [R] Read fst files

2021-06-09 Thread Bill Dunlap
Try using unzip(zipfile, files="desiredFile", exdir=tf<-tempfile()), not unz(zipfile, "desiredFile"), to copy the desired file from the zip file to a temporary location and use read_fst(tf) to read the desired file. -Bill On Wed, Jun 9, 2021 at 11:27 AM Jeff Reichman wrote: > Jan > > Makes sens

Re: [R] Read fst files

2021-06-09 Thread Jeff Newmiller
... but if you are receiving multiple-file zips then you should not be using unz() the way you are in your original post. I have to agree with other responders suggesting that you handle unzipping fst zips manually rather than as part of an R one-liner. On June 9, 2021 11:26:34 AM PDT, Jeff Rei

Re: [R] Read fst files

2021-06-09 Thread Jeff Reichman
Jan Makes sense. Its just that I often receive large zip files that contain a variety of file types. Jef -Original Message- From: R-help On Behalf Of Jan van der Laan Sent: Wednesday, June 9, 2021 12:56 PM To: r-help@r-project.org Subject: Re: [R] Read fst files read_fst is from th

Re: [R] Read fst files

2021-06-09 Thread Jan van der Laan
read_fst is from the package fst. The fileformat fst uses is a binary format designed to be fast readable. It is a column oriented format and compressed. So, to be able to work fst needs access to the file itself and wont accept a file connection as functions like read.table an variants ac

Re: [R] Beginner problem - using mod function to print odd numbers

2021-06-09 Thread Bill Dunlap
Martin wrote Use num[num %% 2 == 1] instead of much slower and ...@#^$ num[ifelse(num %% 2 == 1, TRUE, FALSE)] Read the '[' as 'such that' when the subscript is logical (=="Boolean"==TRUE/FALSE-values). [The original post had a typo/thinko, num<-num+i instead of num<-num+1, which

Re: [R] Read fst files

2021-06-09 Thread Duncan Murdoch
On 09/06/2021 9:12 a.m., Jeff Reichman wrote: Duncan Yea that will work. It appears to be related to setting my working dir, for what ever reason neither seem to work (1) knitr::opts_knit$set(root.dir ="~/My_Reference_Library/Regression") # from R Notebook or (2) setwd("C:/Users/reichmaj/Docum

Re: [R] Read fst files

2021-06-09 Thread Jeff Reichman
Duncan Yea that will work. It appears to be related to setting my working dir, for what ever reason neither seem to work (1) knitr::opts_knit$set(root.dir ="~/My_Reference_Library/Regression") # from R Notebook or (2) setwd("C:/Users/reichmaj/Documents/My_Reference_Library/Regression") # from R

Re: [R] Read fst files

2021-06-09 Thread Duncan Murdoch
It looks as though read_fst wants a filename, not a connection. You should do it in two steps: unzip("Dataset.zip", files = "myFile.fst") myObject <- read_fst("myFile.fst") This is obviously untested; you didn't even say what package read_fst() comes from. Duncan Murdoch On 09/06/2021 8:1

Re: [R] Read fst files

2021-06-09 Thread Eric Berger
Even if ultimately you want to use the functions together, for debugging the problem you should split them into two, as in a <- unz("C:/Users/reichmaj/Documents/My_Reference_Library /Regression /Dataset.zip", filename = "myFile.fst") See if that works, and examine 'a'. And once that is working r

Re: [R] Read fst files

2021-06-09 Thread Jeff Reichman
Eric Typo on my point. setwd("C:/Users/reichmaj/Documents/My_Reference_Library /Regression") myObject <- read_fst(unz("Dataset.zip", filename = "myFile.fst")) # read fst file Error in path.expand(path) : invalid 'path' argument So then I tried myObject <- read_fst(unz("C:/Use

Re: [R] Beginner problem - using mod function to print odd numbers

2021-06-09 Thread Eric Berger
It's also possible to save a character and gain the added advantage of being less understandable :-) num[!!num%%2] On Wed, Jun 9, 2021 at 12:56 PM Martin Maechler wrote: > > David Carlsonon Sun, 6 Jun 2021 15:21:34 -0400 writes: > > > There is really no need for a loop: > > num <- 1:1

Re: [R] Beginner problem - using mod function to print odd numbers

2021-06-09 Thread Martin Maechler
> David Carlsonon Sun, 6 Jun 2021 15:21:34 -0400 writes: > There is really no need for a loop: > num <- 1:100 > num[ifelse(num %% 2 == 1, TRUE, FALSE)] > [1] 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 > [26] 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 8

Re: [R] Read fst files

2021-06-09 Thread Eric Berger
You are missing the second closing parenthesis. This is what the error message is telling you. On Wed, Jun 9, 2021 at 2:44 AM Jeff Reichman wrote: > R-Help Forum > > > > Anyone know why the following line of code would error out: myObject <- > read_fst(unz("Dataset.zip", filename = "filename.f