[R] Cannot Connect to R server

2015-06-24 Thread karlmalone32
My RStudio has a wired problem. When I run library(the package I have successfully installed), RStudio has no response. After endless waiting, an error message comes out saying R cannot connect to the R server. Both my R and RStudio are perfectly updated. Anyone can help me out? I appreciate. --

Re: [R] Draw maps on arbitrary Projections

2015-06-24 Thread Michael Sumner
The easiest way is to find out what the actual projection is, and reconstruct a sensible representation of the grid. Usually you have to guess, but it's possible to figure out. You *can* plot by building a proper mesh in longlat, but my preference is full rescue. You need to know the projection an

Re: [R] R lattice : labeling of matrix groups of different size with strips

2015-06-24 Thread Duncan Mackay
Hi I am not sure what you want plotMatrix , , group1 a b c d 1 1 0 0 0 2 1 0 0 0 3 1 1 0 0 4 0 1 0 0 5 0 1 1 0 , , group2 a b c d 1 0 0 1 0 2 0 0 1 1 3 0 0 0 1 4 NA NA NA NA 5 NA NA NA NA If you do not want to show the NA's without giving them a different colour then here

Re: [R] Broken links (???) in rw-FAQ

2015-06-24 Thread David Winsemius
On Jun 24, 2015, at 10:52 AM, Chel Hee Lee wrote: > Could you also kindly check the following links in the rw-FAQ manual at > ?? The links list in > the below seem to be broken. I hope these links are fixed in the very near > future. >

Re: [R] Usage of vcd packages.

2015-06-24 Thread Michael Friendly
On 6/23/15 4:07 PM, My List wrote: All, I am new to the vcd package and new to R too. Welcome to R and glad you found the vcd package. 1) I have a lickert analysis based data set. 2) I am doing a hypothesis tests on the variables ( like, is there a relationship between the choice of a Doctor

Re: [R] repeated measures: multiple comparisons with pairwise.t.test and multcomp disagree

2015-06-24 Thread Bert Gunter
Andrew Gelman's "Working Through Some Issues" and the two Letters to the Editor that follow responding to the editorial decision to ban P values from The Journal of Basic and Applied Social Psychology (BASP). You may wish also to read ASA President's David Morgenstern's reflexive and entirely predi

Re: [R] repeated measures: multiple comparisons with pairwise.t.test and multcomp disagree

2015-06-24 Thread Jeff Newmiller
Bert, can you be more specific about which article for those of us who don't subscribe? --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] create a dummy variables for companies with complete history.

2015-06-24 Thread Mark Sharp
Giacomo, Please include some representative data. It is not clear why your offset of 4 (z$cod[i - 4]) is going to be an accurate surrogate for complete data. Since I do not have your data set or its true structure I am having to guess. # make 5 copies of 200 companies companies <- paste0(rep(LET

[R] unlisting dplyr do output

2015-06-24 Thread Nathan Pace
I used the dplyr do function to apply a kernel regression smoother to a 3 column data table (grouping index, x, y) with about 7 M rows and 45000 groups. This runs quickly, about 1-2 minutes. It creates an data table (44,326 by 2) - grouping index, kernel smoothing output. The kernel smoothing ou

Re: [R] create a dummy variables for companies with complete history.

2015-06-24 Thread David L Carlson
You may want to consider another way of getting your answer that takes advantage of some of R's features: > # Make some example data > cods <- LETTERS[1:10] # Ten companies > yrs <- 2010:2014 # 5 years > set.seed(42) # Set random seed so we all get the same values > # Chances of revenue for a giv

Re: [R] Rcpp cpp11 and R CMD build

2015-06-24 Thread Dirk Eddelbuettel
Edwin van Leeuwen gmail.com> writes: > > Thank you! I was missing the SystemRequirements. I guess it could be useful > to add this to the example given here: > http://gallery.rcpp.org/articles/simple-lambda-func-c++11/ No. If you actually read the Rcpp documentation--eg the Rcpp Attributes vi

Re: [R] Plotting legend outside of chart area

2015-06-24 Thread Peter Alspach
Tena koe Samantha You probably need to set some graphics parameters such as xpd and mar (see ?par), and then give the × and y location of the legend rather than 'bottomright' (see ?legend). HTH Peter Alspach PS Please don't post in html (see the posting guide) ... P -Original Messa

[R] Need some help with converting MATLAB .m script to R

2015-06-24 Thread ashwinD12 .
Hello, I have few scripts that have been written in MATLAB. I need to translate or convert them into R. They all deal with reading in a netcdf file and doing some plots. I managed to read in the netcdf file with these API calls # Read input file input_dir = "/home/aan/aa/data/r" file = "

[R] Read large '.csv' files from zipped file

2015-06-24 Thread Jianwen Luo
Hi all, I use ireadLines function to iterate large '.csv' files from '.zip' file. When I execute the nextElem function in R console, I can only fetch the first line of file content no matter how many times . Example code show as bellow. > library(iterators) > con<-unz(description='g:\\hourly

[R] Plotting legend outside of chart area

2015-06-24 Thread Samantha Allcock
Hello, I am trying to add a legend to my PCA plot so that it looks neat. I think plotting this outside of the chart area would be good but I cannot seem to fathom the correct code for this. I wondered if anyone could help please? The code I am using is as follows: grp<- with(Matan, cut(R_categ

[R] Draw maps on arbitrary Projections

2015-06-24 Thread Florian Losch
I have spatial data from the WRF-model. I don't know what kind of projection was used to produce these data (neither longitude nor latitude are constant at any borders), but I have 2D matrixes for each longitude and latitude. The area covered is North America. How can I add a map using these 2D mat

Re: [R] repeated measures: multiple comparisons with pairwise.t.test and multcomp disagree

2015-06-24 Thread Denis Chabot
Thank you, Thierry. And yes, Bert, it turns out that it is more of a statistical question after all, but again, since my question used specific R functions, R experts are well placed to help me. As pairewise.t.test was recommended in a few tutorials about repeated-measure Anovas, I assumed it t

Re: [R] Rcpp cpp11 and R CMD build

2015-06-24 Thread Edwin van Leeuwen
Thank you! I was missing the SystemRequirements. I guess it could be useful to add this to the example given here: http://gallery.rcpp.org/articles/simple-lambda-func-c++11/ Cheers, Edwin On Wed, 24 Jun 2015 at 17:50 Charles Determan wrote: > Hi Edwin, > > If you look at the build output you wi

Re: [R] repeated measures: multiple comparisons with pairwise.t.test and multcomp disagree

2015-06-24 Thread Bert Gunter
I would **strongly** recommend that you speak with a local statistical expert before proceeding further. Your obsession with statistical significance is very dangerous. (see the current issue of SIGNIFICANCE for some explanation). Cheers, Bert Bert Gunter "Data is not information. Information is

Re: [R] create a dummy variables for companies with complete history.

2015-06-24 Thread Michael Dewey
Comments below On 24/06/2015 19:26, giacomo begnis wrote: Hi, I have a dataset (728 obs) containing three variables code of a company, year and revenue. Some companies have a complete history of 5 years, others have not a complete history (for instance observations for three or four years).I

Re: [R] create a dummy variables for companies with complete history.

2015-06-24 Thread Sarah Goslee
Please repost your question in plain text rather than HTML - you can see below that your code got rather mangled. Please also include some sample data using dput() - made-up data of similar form is fine, but it's very hard to answer a question based on guessing what the data look like. Sarah On W

[R] create a dummy variables for companies with complete history.

2015-06-24 Thread giacomo begnis
Hi, I have a dataset  (728 obs) containing three variables code of a company, year and revenue. Some companies have a complete history of 5 years, others have not a complete history (for instance observations for three or four years).I would like to determine the companies with a complete histor

[R] Broken links (???) in rw-FAQ

2015-06-24 Thread Chel Hee Lee
Could you also kindly check the following links in the rw-FAQ manual at ?? The links list in the below seem to be broken. I hope these links are fixed in the very near future. Under the section 2.4 Can I customize the installation? *

[R] Broken links (???) in R-FAQ

2015-06-24 Thread Chel Hee Lee
Could you kindly check if the following links are working fine in the R-FAQ page at ? The links listed in the below seem to be broken. I hope these links are fixed in the very near future. Under the section 2.6 Are there Unix-like binaries for R?

Re: [R] Lavaan

2015-06-24 Thread deva d
i tried the semPlot but it flopped. various other packages also did not perform. i will try the DiagrammeR package and revert. meanwhile, i tried going to the onyx package and its neat, though i have yet to spend some time on it to familiarise myself with the nuts and bolts of the process. *..

Re: [R] Rcpp cpp11 and R CMD build

2015-06-24 Thread Charles Determan
Glad to help, The SystemRequirements is for a package. I believe the example in the gallery is intended to demonstrate a function where if you set the CXX_FLAGS with: Sys.setenv("PKG_CXXFLAGS"="-std=c++11") And then compiled a single *.cpp file with Rcpp::sourceCpp("test.cpp") I believe it shou

Re: [R] Rcpp cpp11 and R CMD build

2015-06-24 Thread Charles Determan
Hi Edwin, If you look at the build output you will notice that the C++11 compiler flag is not being used. I just created a small package using Rcpp11 and your function and it worked without a problem. I can't give you a specific reason without seeing your package but there are some possibilities

[R] R lattice : labeling of matrix groups of different size with strips

2015-06-24 Thread R codeplayer
In R lattice, I am trying to label predefined groups of rows in a matrix of data with strips. Currently, the length of the strips fail to match the different sizes of the groups as the data representation only allows groups with the same size. One possibility to solve this might be to suppress the

[R] Rcpp cpp11 and R CMD build

2015-06-24 Thread Edwin van Leeuwen
Hi all, I've just started using Rcpp and am trying to get cpp11 support working. As suggested I added [[Rcpp:plugins(cpp11)]] to my source file and a test function: // [[Rcpp::export]] int useCpp11() { auto x = 10; return x; } This works fine when using: sourceCpp(filename) from R, but I woul

Re: [R] set par options once for entire R session

2015-06-24 Thread MacQueen, Don
The Details section of ?par starts of with: "Each device has its own set of graphical parameters." (So this is not Mac-specific.) Strictly speaking, the options you set with par() are not "reset" when you open a new graphics device. Rather, when a new device is opened, it is initialized with de

Re: [R] Combining estimates from multiple regressions

2015-06-24 Thread James Shaw
Thanks for the suggestions, Gunter. On Wed, Jun 24, 2015 at 10:33 AM, Bert Gunter wrote: > Not an answer to your question, but you should not be using "dummy" > variables in R. Use factors instead. Please read a R tutorial or text > -- there are many -- to learn how to fit models in R. You migh

Re: [R] time management graph

2015-06-24 Thread PIKAL Petr
Hi Jim Thanks a lot. gantt.chart is worth trying, beside Thierry's segment solution. I need to think it over if it can be better for visualisation. Cheers Petr > -Original Message- > From: Jim Lemon [mailto:drjimle...@gmail.com] > Sent: Wednesday, June 24, 2015 12:50 PM > To: PIKAL Pe

Re: [R] time management graph

2015-06-24 Thread Thierry Onkelinx
Maybe something like the punch cards on github? https://github.com/hadley/ggplot2/graphs/punch-card ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 And

Re: [R] time management graph

2015-06-24 Thread PIKAL Petr
Hi Thierry Thanks a lot. This is the option I found later. Still not 100% satisfactory. Maybe somebody did similar task and will have different opinion how to visualise such data. Jim’s gant diagrams are worth consideration so I will try to elaborate it further. Cheers Petr From: Thierry Onk

Re: [R] Combining estimates from multiple regressions

2015-06-24 Thread Bert Gunter
Not an answer to your question, but you should not be using "dummy" variables in R. Use factors instead. Please read a R tutorial or text -- there are many -- to learn how to fit models in R. You might also wish to consult a local statistician or post on a statistics list like stats.stackexchange.c

Re: [R] Lavaan

2015-06-24 Thread Rick Bilonick
Have you considered using the semPlot package? It works nicely with lavaan models (among other sem packages). There is also the DiagrammeR package. Rick On 06/23/2015 10:48 AM, DzR wrote: Dear Senior users of R/R Studio, I am very new to this environment hence am unable to plot the SEM model

Re: [R] define absolute size in plots ... possible?

2015-06-24 Thread Martin Batholdy via R-help
Hi, > That's the default, isn't it? I am sorry – one of my plots was actually set up with mfrow. But the documentation actually explains the change in cex when using mfrow; "In a layout with exactly two rows and columns the base value of "cex" is reduced by a factor of 0.83: if there are three

[R] spacetime stConstruct gives wrong dimensions for long table

2015-06-24 Thread Bebber, Dan
I have a large spatiotemporal database (131 spatial locations, 9 years of daily weather data) in long table format which I would like to convert to an ST object. > head(tempmean) site latlon alt var year mth day value date doy numdate 518941 2701

Re: [R] time management graph

2015-06-24 Thread Thierry Onkelinx
Another option would be to use segments instead of lines. library(lubridate) temp$end <- temp$time + minutes(temp$duration) library(ggplot2) ggplot(temp, aes(x=time, xend = end, y=Typ, yend = Typ, colour=person)) + geom_segment() ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Rese

Re: [R] define absolute size in plots ... possible?

2015-06-24 Thread Duncan Murdoch
On 24/06/2015 7:08 AM, Martin Batholdy via R-help wrote: > Hi, > > I would like to define the size for tick-marks, axis-titles, legends, drawing > symbols etc. absolute, > meaning that regardless of the size of the plot device, the font-size / > character size is the same. > > Thus if I output

[R] define absolute size in plots ... possible?

2015-06-24 Thread Martin Batholdy via R-help
Hi, I would like to define the size for tick-marks, axis-titles, legends, drawing symbols etc. absolute, meaning that regardless of the size of the plot device, the font-size / character size is the same. Thus if I output my plot with pdf(width=5, height=5) or pdf(width=15, height=15), the fon

Re: [R] time management graph

2015-06-24 Thread Jim Lemon
Hi Petr, I'm not exactly sure this is what you are looking for, but try: start_indices<-which(!is.na(temp$duration)) pp_gantt_info<-list( labels=paste(as.character(temp$person[start_indices]), temp$Akce,temp$Typ,sep="-"), starts=temp$time[start_indices], ends=temp$time[start_indices+1], requir

[R] Combining estimates from multiple regressions

2015-06-24 Thread James Shaw
I am interested in using quantile regression to fit the following model at different quantiles of a response variable: (1) y = b0 + b1*g1 + b2*g2 + B*Z where b0 is an intercept, g1 and g2 are dummy variables for 2 of 3 independent groups, and Z is a matrix of covariates to be adjusted for in the

Re: [R] Lavaan

2015-06-24 Thread David Barron
Does the package semPlot not do what you want? I notice that you got an error when you used library(semPlot) because you don't have all the dependencies installed. When you have semPlot working, it should be able to produce a graphical output of the results, including 'covariance arrows'. David

Re: [R] Repeated Measures ANOVA and the Bonferroni post hoc test different results of significantly

2015-06-24 Thread peter dalgaard
> On 24 Jun 2015, at 03:28 , gianni lavaredo wrote: > > > I am doing an Repeated Measures ANOVA and the Bonferroni post hoc test for > my data using R project. The ANOVA gives a significantly difference between > the data but not the Bonferroni post hoc test. > >> anova(aov2) >

Re: [R] Returning the coefficient parameters from JRI

2015-06-24 Thread Jeff Newmiller
I don't use JRI, but the data seem to be there. If you are looking for the row names, try ?rownames. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live G

Re: [R] 'class(.) == **' [was 'Call to a function']

2015-06-24 Thread Martin Maechler
> Steve Taylor > on Wed, 24 Jun 2015 00:56:26 + writes: > Note that objects can have more than one class, in which case your == and %in% might not work as expected. > Better to use inherits(). > cheers, > Steve Yes indeed, as Steve said, really do! The use