Re: [R] Hunting a histogram variant

2017-06-21 Thread Jim Lemon
and I almost forgot Derek Ogle's histStack again in the plotrix package. Jim On Thu, Jun 22, 2017 at 2:01 PM, S Ellison wrote: > > I'm looking for a histogram variant in which data points are plotted as > labelled rectangles 'piled up' to form a histogram. I've posted

Re: [R] Hunting a histogram variant

2017-06-21 Thread Jim Lemon
Hi, This looks very much like a waffle plot, which can be performed with color2D.matplot in the plotrix package. At the moment, the function fill.corner is used to produce the matrix, but this could be generalized to produce any shape of "waffle". The value display is already part of

Re: [R] Hunting a histogram variant

2017-06-21 Thread Richard M. Heiberger
Two things to look at are ?monthplot which shows seasonal subseries plotted on an overall plot. The parallel to your example is small histograms plotted on an overall plot. That goes back (through the reference in the Blue Book (Becker, Chambers, and Wilks)) to Bill Cleveland and Irma Terpenning

Re: [R] Hunting a histogram variant

2017-06-21 Thread Bert Gunter
?stem for something close and built in. Cheers, Bert 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 ) On Wed, Jun 21, 2017 at 9:01 PM, S Ellison

[R] Hunting a histogram variant

2017-06-21 Thread S Ellison
I'm looking for a histogram variant in which data points are plotted as labelled rectangles 'piled up' to form a histogram. I've posted an example at https://www.dropbox.com/s/ozi8bhdn5kqaufm/labelled_histogram.png?dl=0 It seems to have a long pedigree, as I see it (as in this example) in

Re: [R] How to apply a system of ordinary differential equations to a cell grid?

2017-06-21 Thread Marine Regis
Thank you very much for your answer. I'm not sure if I can use the function ode.2 because it's a solver for 2-D partial differential equation problems. My equations don't contain diffusion parameters. Thank you for your help Marine De : David Winsemius

Re: [R] Cross-Validation for Zero-Inflated Models

2017-06-21 Thread Jeff Newmiller
1) Helpdesk implies people whose job it is to provide support. R-help is a mailing list in which users help each other when they have spare time. 2) You sent an email to the R-help mailing list, not to Lara, whoever that is. I suggest you figure out what her email address is and send your

Re: [R] Counting with multiple criteria using data table

2017-06-21 Thread Jeff Newmiller
To be fair, the OP did provide brief snippets of data.table usage below the data dump indicating some level of effort, but posted it all in HTML (what you see we do not see), did not make the example reproducible (dput is great, and library calls really clear things up [1][2][3]), and this

Re: [R] Missing dependencies in pkg installs

2017-06-21 Thread David Winsemius
> On Jun 21, 2017, at 1:39 PM, Conklin, Mike (GfK) wrote: > > I have a Ubuntu server with an R installation that has 384 packages > installed. We are trying to replicate the system on a Red Hat Enterprise > server. I downloaded the list of packages from the Ubuntu

Re: [R] Counting with multiple criteria using data table

2017-06-21 Thread David Winsemius
> On Jun 21, 2017, at 2:50 PM, Ek Esawi wrote: > > I have a data.table which is shown below. I want to count combinations of > columns on i and count on j with by. A few examples are given below the > table. > > > > I want to: > > all months to show on the output

Re: [R] Help/ Mathematics

2017-06-21 Thread David Winsemius
> On Jun 21, 2017, at 11:19 AM, Ahmed Attia wrote: > > Hi R users, > > I need your help to write a code in r that does the following > calculation from three different datasets; > > ac = 1/sum (NPP from date 1 to date 2, dataset=1) * (biomass at date 2 > -biomass at

Re: [R] Help with packages

2017-06-21 Thread Jeff Newmiller
Whatever you do, don't use "Run As Administrator" to install R unless you know exactly why and how you plan to fix the resulting mess. It is normal not to be able to update the library under Program Files. It is not normal (in my experience) to have problems creating the library under your

Re: [R] Counting with multiple criteria using data table

2017-06-21 Thread Bert Gunter
Have you gone through any R tutorials? If not, why not? If so, maybe you need to spend some more time with them. It looks like you want us to do your work for you. We don't do this. See (and follow) the posting guide below for what we might do (we're volunteers, so no guarantees). Cheers, Bert

Re: [R] Help/ Mathematics

2017-06-21 Thread Jim Lemon
Hi Ahmed, Your problem appears trivial as you have already specified the form of the calculation. Learn how to "extract" specified elements from a data structure: # first value sum(dataset1$NPP[dataset1$date >= date1 & dataset1$date <= date2]) # second value dataset2$biomass[dataset2$date ==

[R] Counting with multiple criteria using data table

2017-06-21 Thread Ek Esawi
I have a data.table which is shown below. I want to count combinations of columns on i and count on j with by. A few examples are given below the table. I want to: all months to show on the output including those that they have zero value I want the three statements combined in on if possible

[R] Help with packages

2017-06-21 Thread Alejandro Cayetano Casella
Hi, I want to download the packages into R in my personal computer and this is what appears on the screen: > utils:::menuInstallPkgs() Warning in install.packages(NULL, .libPaths()[1L], dependencies = NA, type = type) : 'lib = "C:/Program Files/R/R-3.4.0/library"' is not writable Error in

[R] Missing dependencies in pkg installs

2017-06-21 Thread Conklin, Mike (GfK)
I have a Ubuntu server with an R installation that has 384 packages installed. We are trying to replicate the system on a Red Hat Enterprise server. I downloaded the list of packages from the Ubuntu machine and read it into an R session on the new machine. Then I ran

Re: [R] How to apply a system of ordinary differential equations to a cell grid?

2017-06-21 Thread David Winsemius
> On Jun 21, 2017, at 12:48 PM, Marine Regis wrote: > > Hello, > > I am developing an agent-based model to simulate the spread of infectious > diseases in heterogeneous landscapes composed of habitat polygons (or clumps > of connected cells). To simplify the model, I

[R] How to apply a system of ordinary differential equations to a cell grid?

2017-06-21 Thread Marine Regis
Hello, I am developing an agent-based model to simulate the spread of infectious diseases in heterogeneous landscapes composed of habitat polygons (or clumps of connected cells). To simplify the model, I consider a habitat grid (or raster) containing the polygon ID of each cell. In addition, I

Re: [R] selecting dataframe columns based on substring of col name(s)

2017-06-21 Thread David Winsemius
> On Jun 21, 2017, at 9:11 AM, Evan Cooch wrote: > > Suppose I have the following sort of dataframe, where each column name has a > common structure: prefix, followed by a number (for this example, col1, col2, > col3 and col4): > > d = data.frame( col1=runif(10),

[R] Segmentation Fault when Installing Some Packages

2017-06-21 Thread Lorenzo Isella
Dear All, I have a fresh Debian Stretch (now the official Debian stable) installation on my machine. Based on what written here https://cran.r-project.org/bin/linux/debian/#debian-jessie-stable I added the line deb https://stat.ethz.ch/CRAN/bin/linux/debian stretch-cran34/ to my sources in

Re: [R] selecting dataframe columns based on substring of col name(s)

2017-06-21 Thread Bert Gunter
Assume there 100 columns, named col1, col2,..., col100 in data frame d + maybe some more columns with various names preceding them. You want col21 to col72. nm <- names(d) d[, which(nm == "col21"): which(nm == "col72") ] ## NB : if all you have is col1 to col100 the d[, 23:72] works fine. See

Re: [R] R and Tableau Compatibility

2017-06-21 Thread Shivi Bhatia
blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } R and Tableau can easily get connected with their latest versions. I have been using both for my case. 10.1 version of tableau

Re: [R] Help/ Mathematics

2017-06-21 Thread Bert Gunter
We expect posters to have made an effort to learn R and show us code that they have tried. We do not provide free software development. The "Introduction to R" tutorial that ships with the software is one place to start, but there are many good web tutorials also available. Just search. Cheers,

Re: [R] selecting dataframe columns based on substring of col name(s)

2017-06-21 Thread Jeff Newmiller
d[ , paste( "col", 2:4 ) ] or d[ , sprintf( "col%d", 2:4 ) ] or d[ , grep( "^col[234]$", names( d ) ] Each approach has different ways of being flexible. -- Sent from my phone. Please excuse my brevity. On June 21, 2017 9:11:10 AM PDT, Evan Cooch wrote: >Suppose I

[R] Advanced bootstrap question

2017-06-21 Thread Michael Ash
I have an advanced question about bootstrapping. There are two datasets. In each bootstrap iteration, I would like to sample One observation per cluster from the first dataset. N observations with replacement from the second dataset. Right now I am using dplyr::sample_n() for first dataset,

[R] selecting dataframe columns based on substring of col name(s)

2017-06-21 Thread Evan Cooch
Suppose I have the following sort of dataframe, where each column name has a common structure: prefix, followed by a number (for this example, col1, col2, col3 and col4): d = data.frame( col1=runif(10), col2=runif(10), col3=runif(10),col4=runif(10)) What I haven't been able to suss out is

Re: [R] Cross-Validation for Zero-Inflated Models

2017-06-21 Thread Eric Weine
Lara: I see you sent this email to the R helpdesk a really long time ago, but I was just wondering if you ever got an answer to this question. I was just thinking that I would build my own cross validation function, but if you figured out a way to do this automatically, could you let me know?

[R] Help/ Mathematics

2017-06-21 Thread Ahmed Attia
Hi R users, I need your help to write a code in r that does the following calculation from three different datasets; ac = 1/sum (NPP from date 1 to date 2, dataset=1) * (biomass at date 2 -biomass at date 1, dataset = 2) + (littfall at date 2, dataset=3). all the dates are in yr-month-day

Re: [R] fitting cosine curve

2017-06-21 Thread Charles C. Berry
On Wed, 21 Jun 2017, J C Nash wrote: Using a more stable nonlinear modeling tool will also help, but key is to get the periodicity right. The model is linear up to omega after transformation as Don and I noted. Taking a guess that 2*pi/240 = 0.0262 is about right for omega: rsq <-

Re: [R-es] openair(windows vs linux)

2017-06-21 Thread Javier Valdes Cantallopts (DGA)
Tienes razón Carlos, sin embargo en mi maquina Windows tuve que instalar las dependencias Lattice para explotar al máximo el potencial. Pero ahora estamos ok. [Descripción: FIRMA3] De: Carlos Ortega [mailto:c...@qualityexcellence.es] Enviado el: miércoles, 21 de junio de 2017 12:12 Para: Javier

[R-es] openair(windows vs linux)

2017-06-21 Thread Javier Valdes Cantallopts (DGA)
Estimados les escribo por lo siguiente: He estado probando las potencialidades del paquete "openair" y la verdad que aun no comprendo porque en algunas tareas (plots) Windows no explota la capacidad del paquete a diferencia de Linux. Por ejemplo; summaryPlot,en linux lo puedo modificar

Re: [R] R and Tableau Compatibility

2017-06-21 Thread David Winsemius
> On Jun 21, 2017, at 6:24 AM, Dai, Shengyu [HCSUS] wrote: > > Good morning R helpers, > > I hope this email finds you well. > > Recently, I am thinking of using R with connection to Tableau. I search > information online but I did not see any official documentations about

Re: [R] customizing color key with plot3D

2017-06-21 Thread Waichler, Scott R
Karline, Thank you for your help. I discovered that in addition to including clim, I needed to omit breaks. This code uses one of your other examples as a starting point and works as intended: persp3D(z = volcano, zlim = c(-60, 200), phi = 20, colkey = list(length = 0.2, width = 0.4,

[R] Permutations in RDA for repeated measures, using how()

2017-06-21 Thread Margot Neyret
Dear all, I am using RDA to study plant communities in various land uses (variable LU with values M, U, etc.). For each land use, I sample 3 to 5 fields (M1, M2, U1, U2, etc). I make 5 measurements for both plant communities and environmental variables in each field. I repeat the process every

Re: [R] Problem with shortestPath in igraph and qgraph

2017-06-21 Thread Zahra Tofighi
I hope this new post be according to your tips. My database is big so i upload it in Dropbox and here is the link to download it: https://www.dropbox.com/pri/get/cognitiveEdges.csv?_subject_uid=680429290=AADQFwqcK-l66BiR4hcJayEc8dFbn0YNHdzeJ7ErqiKr1g and here is code to run in R studio (3.4.0) :

[R] R and Tableau Compatibility

2017-06-21 Thread Dai, Shengyu [HCSUS]
Good morning R helpers, I hope this email finds you well. Recently, I am thinking of using R with connection to Tableau. I search information online but I did not see any official documentations about these compatibilities. I have Tableau version 10.1 and I wonder which versionS of R is

Re: [R] 3D plot with coordinates

2017-06-21 Thread Alaios via R-help
Thanks Duncan for the replyI can not suppress anything these are radiation pattern measurements that are typically are taken at X,Y and Z planes. See an example here, where I want to plot the measurements for the red, green and blue planes (so the image below withouth the 3d green structure

Re: [R] fitting cosine curve

2017-06-21 Thread J C Nash
Using a more stable nonlinear modeling tool will also help, but key is to get the periodicity right. y=c(16.82, 16.72, 16.63, 16.47, 16.84, 16.25, 16.15, 16.83, 17.41, 17.67, 17.62, 17.81, 17.91, 17.85, 17.70, 17.67, 17.45, 17.58, 16.99, 17.10) t=c(7, 37, 58, 79, 96, 110, 114, 127, 146, 156,

Re: [R] 3D plot with coordinates

2017-06-21 Thread Duncan Murdoch
On 21/06/2017 5:23 AM, Alaios via R-help wrote: Thanks a lot for the reply.After looking at different parts of the code today I was able to start with simple 2D polar plots as the attached pdf file. In case the attachment is not visible I used the plot.polar function to create something

Re: [R] 3D plot with coordinates

2017-06-21 Thread Alaios via R-help
Thanks a lot for the reply.After  looking at different parts of the code today I was able to start with simple 2D polar plots as the attached pdf file.  In case the attachment is not visible I used the plot.polar function to create something like

[R] [R-pkgs] New package: phylogram

2017-06-21 Thread Shaun Wilkinson
Dear all, I'd like to introduce a new R package called *phylogram,* for working with evolutionary trees as deeply-nested lists known as "dendrogram" objects. The package provides functions for importing and exporting phylogenetic trees in the Newick parenthetic text format, as well as several

[R] [R-pkgs] lmvar

2017-06-21 Thread Marco Nijmeijer
The package 'lmvar' (https://CRAN.R-project.org/package=lmvar) fits a model which is linear in the expected value and log-linear in the variance. The fit is like the classical linear fit implemented in 'lm' but lifts the assumption of a constant variance which is implicit in 'lm'. Instead,

[R] getting error while trying to make dendogram based on gene expression

2017-06-21 Thread Yogesh Gupta
I am trying to make dendogram based on gene expression matrix , but getting some error: I countMatrix = read.table("count.row.txt",header=T,sep='\t',check.names=F) colnames(countMatrix) count_matrix <- countMatrix[,-1] # remove first column (gene names) rownames(count_matrix)

[R] Getting a 404 error reading CRAN mirror repository

2017-06-21 Thread Patrick Giraudoux
Dear all, I try to get a CRAN mirror repository working on my Ubuntu trusty plateform. So, including e.g.: deb https://mirror.ibcp.fr/pub/CRAN/bin/linux/ubuntu trusty universe in /etc/apt/source.lst However, on every mirror tried I get: Err https://mirror.ibcp.fr trusty/universe amd64

[R] encoding/locale problem with ssh -X

2017-06-21 Thread Andreas Leha
Hi all, I am struggling with remote R sessions and a (I suspect) locale related encoding problem: Using the X11 device (X11forwarding enabled), whenever I try to plot something containing umlauts using ggplot2, I am seeing sth like , | Error in grid.Call(L_stringMetric,