[R] Cannot view custom tiles made in package tiler in r leaflet - either locally or from github pages server.

2020-02-05 Thread nevil amos
I wish to create tiled version of a large number of custom rasters for viewing in shiny/leaflet apps ( to speed viewing of rasters) I have produced tiles using package tiler, these can be viewed in the preview.html, but when uploaded to github pages as described in the introduction to tiler they

Re: [R] how to create a pivot table in r?

2020-02-05 Thread Rui Barradas
Hello, Function tidyr::pivot_wider is meant for this kind of problem. It is package tidyr's new way of reshaping from long to wide format. QUoting from the help page: Details pivot_wider() is an updated approach to spread(), designed to be both simpler to use and to handle more use cases. W

Re: [R] [FORGED] Re: readxl issue

2020-02-05 Thread Abby Spurdle
> should have been read_excel whose parameters need to be adjusted to not look > for a header line. And Jeff's probably correct (from the package documentation): > read_excel(path, sheet = NULL, range = NULL, col_names = TRUE, Set col_names to FALSE...??? But still be careful with the as.data.f

Re: [R] readxl issue

2020-02-05 Thread Abby Spurdle
> I'm using readxl and dplyr to extract a specific cell from all worksheets in > a directory. > All of these worksheets have the same physical layout. I don't have access to Excel, so can't test this. I have a suspicion that the problem is not readxl. But rather the "as.data.frame" step. Try re

Re: [R] [FORGED] Re: readxl issue

2020-02-05 Thread Jeff Newmiller
My assessment was and is likely correct. My error was in writing the wrong function name... should have been read_excel whose parameters need to be adjusted to not look for a header line. On February 5, 2020 3:48:36 PM PST, Rolf Turner wrote: > >On 6/02/20 11:01 am, Thomas Subia wrote: > >> Jef

[R] how to create a pivot table in r?

2020-02-05 Thread Marna Wagley
Hi R users, I was trying to create a pivot table for the following data, in which I wanted to put "id" in rows and "ObsSite" in columns and "Obsdate" is in the cells. I used the following code but it took only one date among the two dates. For example, the animal (Id2) which was observed in the s

Re: [R] [FORGED] Re: readxl issue

2020-02-05 Thread Rolf Turner
On 6/02/20 11:01 am, Thomas Subia wrote: Jeff, You wrote: " Pay attention to whether the read_csv call is configured to expect first line as header." Here is the code I'm using to extract one cell from a series of Excel files having the same physical format. library(plyr) library(readxl)

Re: [R] readxl issue

2020-02-05 Thread Thomas Subia
Jeff, You wrote: " Pay attention to whether the read_csv call is configured to expect first line as header." Here is the code I'm using to extract one cell from a series of Excel files having the same physical format. library(plyr) library(readxl) files <- list.files(pattern="*.xls", full.name

Re: [R] readxl issue

2020-02-05 Thread Jeff Newmiller
Pay attention to whether the read_csv call is configured to expect first line as header. On February 5, 2020 11:09:01 AM PST, Thomas Subia wrote: >Colleagues, > >I'm using readxl and dplyr to extract a specific cell from all >worksheets in a directory. >All of these worksheets have the same phy

[R] readxl issue

2020-02-05 Thread Thomas Subia
Colleagues, I'm using readxl and dplyr to extract a specific cell from all worksheets in a directory. All of these worksheets have the same physical layout. Issue 1: Minus sign replaced by an X after data extraction. library(plyr) library(readxl) files <- list.files(pattern="*.xls", full.names

Re: [R] Class balancing ratio

2020-02-05 Thread Bert Gunter
Questions on specialized packages (the ROSE package presumably) may not get answered on this list. If that turns out to be the case, you may wish to contact the package maintainer: Nicola Lunardon . Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking

Re: [R] Question about autocomplete Keyboard Shortcut in R Markdown Latex

2020-02-05 Thread Duncan Murdoch
On 05/02/2020 12:57 p.m., Jeff Newmiller wrote: The rmarkdown package is not the issue... this question is about editor customization. Rmarkdown can be edited in many text editors and IDEs, and none of them are on topic here. That said, there is a high probability that OP is using the RStudio

Re: [R] Question about autocomplete Keyboard Shortcut in R Markdown Latex

2020-02-05 Thread Jeff Newmiller
The rmarkdown package is not the issue... this question is about editor customization. Rmarkdown can be edited in many text editors and IDEs, and none of them are on topic here. That said, there is a high probability that OP is using the RStudio IDE, and indeed it would be best to ask them for a

Re: [R] doing 1000 permutations and doing test statistics distribution

2020-02-05 Thread Ivan Krylov
On Wed, 5 Feb 2020 09:15:16 -0600 Ana Marija wrote: > I tried to solve the task via following code: > all_results <- lapply(manyorders, function(ord) { # ... > list(fit = fit, y1 = y1) > }) > and I wrote all_results in a file > write.table(all_results, file="all_res", sep = " ", row.names =

Re: [R] Question about autocomplete Keyboard Shortcut in R Markdown Latex

2020-02-05 Thread Bert Gunter
Try posting this at the RStudio Help site, as R Markdown is part of the ecosystem they have created and support. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) O

[R] Question about autocomplete Keyboard Shortcut in R Markdown Latex

2020-02-05 Thread Tao Z
Hi, In R, we know how to autocomplete a function name or some arguments in the function. I usually use “Tab” to achieve this. But when I was preparing my math homework using R Markdown, I want to achieve similar results: for example, I want to autocomplete $\frac{}{}$ when I only typed $\fr$

Re: [R] doing 1000 permutations and doing test statistics distribution

2020-02-05 Thread Ana Marija
I tried to solve the task via following code: manyorders <- replicate(100, sample(colnames(dat)), simplify=FALSE) all_results <- lapply(manyorders, function(ord) { tmpdat <- `colnames<-`(dat, ord) # copies and renames in one line corfit <- duplicateCorrelation(dat, block = targets$Subject)