Re: [R] not common records

2016-06-02 Thread Jeff Newmiller
?merge Pay attention to the all-whatever parameters. -- Sent from my phone. Please excuse my brevity. On June 2, 2016 7:04:47 PM PDT, Ashta wrote: >I have 2 data sets. File1 and File2. Some records are common to both >data sets. For those common records I want get the difference between >d_x1

[R] not common records

2016-06-02 Thread Ashta
I have 2 data sets. File1 and File2. Some records are common to both data sets. For those common records I want get the difference between d_x1z1= z1-x1 and d_x2z2= z2-x2. File1<- data.frame(var = c(561,752,800,900), x1= c(23,35,40,15), x2= c(125,284,280,347)) File2<- data.frame(var = c(561,75

[R] bnlearn cpquery

2016-06-02 Thread ross.chapman
Hi all I have created a Bayes network with 14 nodes using the bnlearn package and want to explore the conditional probabilities for specific node with a given set of evidence using the cpquery() command. I find that repeating the command gives very different results for the same set of evi

Re: [R] problems compiling packages | 3.3.0 | Linux

2016-06-02 Thread Marc Schwartz
On Jun 2, 2016, at 10:35 AM, Evan Cooch wrote: > > Updated my R install on my GNU/Linux boxes (running RHEL 6.xx), using latest > from CRAN (i.e., not compiling from source), and while said upgrade seemed to > go fine, am having all sorts of problems with getting some packages to > compile (ei

[R] problems compiling packages | 3.3.0 | Linux

2016-06-02 Thread Evan Cooch
Updated my R install on my GNU/Linux boxes (running RHEL 6.xx), using latest from CRAN (i.e., not compiling from source), and while said upgrade seemed to go fine, am having all sorts of problems with getting some packages to compile (either during an initial install attempt, or upgrade to exis

[R] R integration with Hive with Kerberos enabled

2016-06-02 Thread Arti Wadhwani
Hi, I have a question regarding R integration with Hive in kerberized mode. Is it supported? It works fine without kerberos however fails with below error in a kerberized cluster: java.lang.RuntimeException: org.apache.thrift.transport.TTransportException: Peer indicated failure: GSS initiate

[R] Need help getting plotly to run on R

2016-06-02 Thread KMNanus
I signed up with plotly on their own site - https://plot.ly/ - and got a username and password. When I installed the package in R, I got the following error msg - "Storing 'username' as the environment variable 'plotly_username' Error in Sys.setenv(plotly_username = username)

Re: [R] reading data into nested frames

2016-06-02 Thread Ulrik Stervbo
Hi Ed, I'm not sure I understand, but can't you rwad the files one by one and create one data.frane using rbind? Is easy to put do in a loop too. Best wishes, Ulrik On Thu, 2 Jun 2016, 20:23 Ed Siefker, wrote: > I have many data files named like this: > > E11.5-021415-dko-1-1-masked-bottom-a

[R] reading data into nested frames

2016-06-02 Thread Ed Siefker
I have many data files named like this: E11.5-021415-dko-1-1-masked-bottom-area.tsv E11.5-021415-dko-1-1-masked-top-area.tsv E11.5-021415-dko-1-2-masked-bottom-area.tsv E11.5-021415-dko-1-2-masked-top-area.tsv E11.5-021415-dko-1-3-masked-bottom-area.tsv E11.5-021415-dko-1-3-masked-top-area.tsv ag

Re: [R] Struggling trying to plot points on boxplot

2016-06-02 Thread Thomas Adams
Bill, Thank you!! With some tweaking, this approach was exactly what I needed. Previously, I had been using bxp and had my code for it, but my data was structured completely differently from what I have now. I figured something like groupedX <- with(d, split(x, group)) existed, but how to find it?

Re: [R] Trouble getting rms::survplot(..., n.risk=TRUE) to behave properly

2016-06-02 Thread Steve Lianoglou
Ah! Sorry ... should have dug deeper into the examples section to notice that. Thank you for the quick reply, -steve On Thu, Jun 2, 2016 at 8:59 AM, Frank Harrell wrote: > This happens when you have not strat variables in the model. > > > -- > Frank E Harrell Jr

Re: [R] Trouble getting rms::survplot(..., n.risk=TRUE) to behave properly

2016-06-02 Thread Frank Harrell
This happens when you have not strat variables in the model. -- Frank E Harrell Jr Professor and Chairman School of Medicine Department of *Biostatistics* *Vanderbilt University* On Thu, Jun 2, 2016 at 10:55 AM, Steve Lianoglou wrote: > Hello foks, >

[R] Trouble getting rms::survplot(..., n.risk=TRUE) to behave properly

2016-06-02 Thread Steve Lianoglou
Hello foks, I'm trying to plot the number of patients at-risk by setting the `n.risk` parameter to `TRUE` in the rms::survplot function, however it looks as if the numbers presented in the rows for each category are just summing up the total number of patients at risk in all groups for each timepo

Re: [R] Struggling trying to plot points on boxplot

2016-06-02 Thread William Dunlap via R-help
Does using zz<-bxp(boxplot(data,plot=FALSE)) do what you want? E.g., d <- transform(data.frame(t=1:15), x = sin(t)+log2(t), group = paste("Group", t%/%4)) groupedX <- with(d, split(x, group)) zz <- bxp(boxplot(groupedX, plot=FALSE)) # bxp returns the x positions of the boxes points(col="blue", pc

Re: [R] Struggling trying to plot points on boxplot

2016-06-02 Thread RICHARD M. HEIBERGER
something like this points(zz[1:length(obs$value)], obs$value,lty=3,lwd=1,col="red",pch=19) Sent from my iPhone > On Jun 2, 2016, at 11:36, Thomas Adams wrote: > > points(zz, obs$value,lty=3,lwd=1,col="red",pch=19) __ R-help@r-project.org mailing li

Re: [R] Struggling trying to plot points on boxplot

2016-06-02 Thread Sarah Goslee
boxplot() turns the x variable into a factor, if it isn't already, so the x axis is calibrated as seq_len(nvalues). Whatever you're trying to do with using your boxplot object as the x variable in points won't work: zz is a list of length 6. There's an example in ?boxplot of adding points to a box

[R] Struggling trying to plot points on boxplot

2016-06-02 Thread Thomas Adams
Hello all: I've been beating my head on this for over a day and I have done a lot of Google'ing with no luck. I have generated a 'time-series' of boxplots (227), covering more than a 30-day period at 6-hour intervals, which summarize an ensemble forecast. What I want to do is over-plot the observ

[R] coxph: no convergence with completely tied data with 'exact'-method

2016-06-02 Thread Johannes Hengelbrock
Dear users, I'm trying to estimate a conditional logistic model using the coxph()-function from the survival package. Somehow, the model does not converge if time is set to the same value for all observations: library(survival) set.seed(12345) n <- 3000 a <- rbinom(n, 1, 0.5

[R] FW: How to read multiple raster and serial correlation between series of rasters

2016-06-02 Thread Waseem Ali
Dear members, With little effort in producing the code to read all nc files for Carbon dioxide variables I have produced the following code: library(ncdf)ncfiles <- list.files("C:/site-download/AIRS/", pattern='\\.nc$', full.names = TRUE)ncfilesncfname <- ncfiles[1]ncfnamedname <- "mole_fract

Re: [R] Making an if condition variable ?

2016-06-02 Thread Bert Gunter
You need to rethink. You'll do better in the long -- and probably short, too -- run working within the language's paradigms rather than resisting them. (It's not that R's paradigms are in any sense "the best"; other languages have different paradigms and you would do better in those languages with

Re: [R] Convert ncdf data to dataframe

2016-06-02 Thread MacQueen, Don
There's a pretty good chance this question has been previously asked and answered on the R-sig-geo mailing list (though I don't know for sure). In addition, entering "R convert ncdf to data frame" in a web search returned some possibilities, the first of which (for me) was http://geog.uoreg

Re: [R] Making an if condition variable ?

2016-06-02 Thread ce
well, not that simple. My original condition and changes are more complicated than I post in r-help for simplicity purposes . Original condition is something like : if ( a > 0 & ( b[1] > b[2] ) | c == TRUE ) and I might change it to if ( a == 0 & ( b[1] < b[2] ) & d > 10 ) then I nee

Re: [R] Convert ncdf data to dataframe

2016-06-02 Thread Jeff Newmiller
The answer to your question is "yes". You probably need to make your example reproducible by including (or referencing by URL) sample data if you want a more complete response. -- Sent from my phone. Please excuse my brevity. On June 2, 2016 1:42:55 AM PDT, Miluji Sb wrote: >Dear all, > >I ha

Re: [R] Making an if condition variable ?

2016-06-02 Thread Rainer M Krug
"ce" writes: > Thank you all for wisdom :) > Problem is that I change the condition often and then I forget it. I > wanted to put it at the beginning of the program with the other > parameters so I wouldn't miss it. In this case - why not use a function instead of the condition? cond <- functio

Re: [R] Making an if condition variable ?

2016-06-02 Thread ce
Thank you all for wisdom :) Problem is that I change the condition often and then I forget it. I wanted to put it at the beginning of the program with the other parameters so I wouldn't miss it. ce -Original Message- From: "Rainer M Krug" [rai...@krugs.de] Date: 06/02/2016 04:00 AM T

Re: [R] SEM GFI

2016-06-02 Thread Fox, John
Dear Vinay and Burt, I didn't see Vinay's original posting -- sorry about that. Vinay: There's still not enough information here to tell why the results are different, and posting in HTML makes the code very hard to read. To elaborate slightly: You don't provide the data, so it's not possible

Re: [R] httr package syntax (PUT)

2016-06-02 Thread Hadley Wickham
On Wed, Jun 1, 2016 at 7:16 PM, Jared Rodecker wrote: > Greetings fellow R users. > > I'm struggling with the syntax of submitting a PUT request > > I'm trying to insert a few PUT requests into some legacy R code that I have > that performs daily ETL on a small database. These requests will add us

Re: [R] translating function td of package tempdisagg to FORTRAN

2016-06-02 Thread MAURICE Jean - externe
Ouaouh ! Thanks a lot Jean Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusio

Re: [R] translating function td of package tempdisagg to FORTRAN

2016-06-02 Thread Berend Hasselman
> On 2 Jun 2016, at 12:41, MAURICE Jean - externe > wrote: > > I am (still) translating long R scripts to FORTRAN to improve speed. My > client deals with river's flow. > > He has datas for each day of a week, we need to 'disaggregate' them to an > hourly base (is that clear ?) . In R, he us

[R] translating function td of package tempdisagg to FORTRAN

2016-06-02 Thread MAURICE Jean - externe
I am (still) translating long R scripts to FORTRAN to improve speed. My client deals with river's flow. He has datas for each day of a week, we need to 'disaggregate' them to an hourly base (is that clear ?) . In R, he uses function td of library tempdisagg with the 'denton-cholette' algorithm.

Re: [R] Map of Italy data filled at the level of the province

2016-06-02 Thread boB Rudis
This should help you get started: library(maptools) library(ggplot2) library(ggalt) library(ggthemes) library(tibble) library(viridis) # get italy region map italy_map <- map_data("italy") # your data will need to have these region names print(unique(italy_map$region)) # w

[R] Map of Italy data filled at the level of the province

2016-06-02 Thread francesca Pancotto
Dear Users I am very new to the use of ggplot. I am supposed to make a plot of Italian provinces in which I have to fill the color of some provinces with the values of a variable(I do not provide the data because it is irrelevant which data to use). Right now I explored the function map in maps

[R] Convert ncdf data to dataframe

2016-06-02 Thread Miluji Sb
Dear all, I have used the following code to read in a ncdf file library(chron) library(lattice) library(ncdf4) library(data.table) ncname <- ("/file_path") ncfname <- paste(ncname, ".nc", sep = "") dname <- "ssl" # note: tmp means temperature (not temporary) ncin <- nc_open(ncfname) print(ncin

Re: [R] Making an if condition variable ?

2016-06-02 Thread Rainer M Krug
Jeff Newmiller writes: > Beware of getting too "meta" in your programming... it is rarely worth > it. Just write the code and move on with life. That is the beauty of a > scripting language. +1 I think this a very common pitfall (I know it from own experience...) and I would say a candidate for

Re: [R] Unable to update R software to 3.3.0

2016-06-02 Thread Loris Bennett
Loris Bennett writes: > Loris Bennett writes: > >> Hi Sunish, >> >> Sunish Kumar Bilandi writes: >> >>> Hi Team, >>> >>> I am using RedHat 5 and installed R using YUM, (R version 3.2.3) Now I >>> want to update R version tp 3.3.0, but I am unable to do that, Is >>> there any alternate to do thi