Re: [R] Change values in a dateframe-Speed TEST

2013-07-25 Thread Arnaud Michel
Hi For a dataframe with name PaysContrat1 and with nrow(PaysContrat1) [1] 52366 the test of system.time is : system.time(droplevels(do.call(rbind,lapply(split(PaysContrat1,PaysContrat1$Matricule), FUN=function(x) {x[,c(Nom,Prénom)] - x[nrow(x),c(Nom,Prénom),drop=TRUE];x} user system

Re: [R] Change values in a dateframe-Speed TEST

2013-07-25 Thread Arnaud Michel
But I just noticed that the two solutions are not comparable : the change concern only Nom and Prenom (solution Berend) and not also Sexe or Date.de.naissance orother variables (solution Arun) that can changed. But my question was badly put. Michel Le 25/07/2013 08:06, Arnaud Michel a écrit :

Re: [R] Change values in a dateframe-Speed TEST

2013-07-25 Thread Berend Hasselman
On 25-07-2013, at 08:35, Arnaud Michel michel.arn...@cirad.fr wrote: But I just noticed that the two solutions are not comparable : the change concern only Nom and Prenom (solution Berend) and not also Sexe or Date.de.naissance orother variables (solution Arun) that can changed. But my

[R] Clarification of inputs for xyf function of kohonen package

2013-07-25 Thread Ben Harrison
For supervised version of the kohonen SOM (xyf), I wish to train a map, and then predict a property from the trained map. For the function xyf, whose basic call is: xyf(data, Y, grid) should the data argument contain the Y property? Or does it need to be excluded? e.g.: head(somdata)

Re: [R] Change values in a dateframe-Speed TEST

2013-07-25 Thread Arnaud Michel
Le 25/07/2013 08:50, Berend Hasselman a écrit : On 25-07-2013, at 08:35, Arnaud Michel michel.arn...@cirad.fr wrote: But I just noticed that the two solutions are not comparable : the change concern only Nom and Prenom (solution Berend) and not also Sexe or Date.de.naissance orother variables

[R] Unable to install packages

2013-07-25 Thread Arnab Chakrabarti
Hi all. I am new to R. I have just installed R2.10.1 for my Windows 7 computer. When I go to Packages Install Packages on the drop-down list, I get the message: Warning: unable to access index for repository http://ftp.iitm.ac.in/cran/bin/windows/contrib/2.10 Warning: unable to access index for

Re: [R] Saving multiple rda-files as one rda-file

2013-07-25 Thread Dark
Really no one has any suggestions on this issue? -- View this message in context: http://r.789695.n4.nabble.com/Saving-multiple-rda-files-as-one-rda-file-tp4672041p4672278.html Sent from the R help mailing list archive at Nabble.com. __

[R] Error in initial value for qmatrix in msm function

2013-07-25 Thread Rianti Siswi Utami
*Hi R-helpers, **I am having a problem in running msm. I have a data with 200 ID, 4 state and transition is allowed for every state.**This is the number of transitions statetable.msm(Status,ID,data=dt) to from 1 2 3 4 1 0 54 181 100 2 11 14 7 11 3 49 12 42 10

[R] Neural Network Problem

2013-07-25 Thread nntx
Hello Professionals, I am new to R and am planning to use R for a Artificial Neural Network regression. I have 10 different scenarios for each observation (Input). For each scenario, there are 7 variables, which means 7 output. I have 1000 observations in total and I do have 1000 expected

[R] ask help!

2013-07-25 Thread mei_yuan
Hi, In the R console, I have the following: runif(10) Error in runif(10) : '.Random.seed' is not an integer vector but of type 'list' Can someone advise me of the solution of the problem? Mei-Yuan Chen Department of Finance NCHU, aiwan __

Re: [R] flexible approach to subsetting data

2013-07-25 Thread arun
Also, using the bigger example dataset: If you want all the 81 variables in the long form,  it looks like you have to use 81 `grepl()` statements Wouldn't it be easier to just use: names(rtNew)-paste0(gsub(\\..*,,names(rtNew)),_,rep(1:5,each=81))

Re: [R] ask help!

2013-07-25 Thread Jim Lemon
On 07/25/2013 07:44 PM, mei_yuan wrote: Hi, In the R console, I have the following: runif(10) Error in runif(10) : '.Random.seed' is not an integer vector but of type 'list' Can someone advise me of the solution of the problem? Mei-Yuan Chen Hi Mei-Yuan, .Random.seed should be a

Re: [R] Unable to install packages

2013-07-25 Thread Pascal Oettli
Hello, Is there any reason for you to install an almost 3-year-old version of R? Regards, Pascal 2013/7/25 Arnab Chakrabarti chakrabarti.ar...@gmail.com Hi all. I am new to R. I have just installed R2.10.1 for my Windows 7 computer. When I go to Packages Install Packages on the drop-down

Re: [R] ask help!

2013-07-25 Thread Helios de Rosario
-- Helios de Rosario Martínez Researcher El día 25/07/2013 a las 11:44, mei_yuan mei_y...@dragon.nchu.edu.tw escribió: Hi, In the R console, I have the following: runif(10) Error in runif(10) : '.Random.seed' is not an integer vector but of type 'list' It seems you have

Re: [R] ask help!

2013-07-25 Thread Prof Brian Ripley
No R version was stated, but this is not the behaviour of R-patched so you could update. On 25/07/2013 11:01, Jim Lemon wrote: On 07/25/2013 07:44 PM, mei_yuan wrote: Hi, In the R console, I have the following: runif(10) Error in runif(10) : '.Random.seed' is not an integer vector but

Re: [R] How to split two levels several times?

2013-07-25 Thread dennis1991
Hi Rui once more thank you for your help. But the code does so far not solve the problem because it still treats rows 17-22 (repeated appearance of electrode1) as one single level. However as can be seen by rows 1-3 (or rows 17-19 and rows 20-22) and the order of the length variable (row 1 =

[R] Saved Session Pitfalls (was: ask help!)

2013-07-25 Thread Jan Kim
On Thu, Jul 25, 2013 at 08:01:50PM +1000, Jim Lemon wrote: On 07/25/2013 07:44 PM, mei_yuan wrote: Hi, In the R console, I have the following: runif(10) Error in runif(10) : '.Random.seed' is not an integer vector but of type 'list' Can someone advise me of the solution of the

Re: [R] Function, that assigns two vectors to each other

2013-07-25 Thread Anne-Marie B. Gallrein
Hello guys, I created an example data set: structure(list(pa = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), a1 = c(84, 108, 113, 99, 98, 88, 90, 89, 95, 77), a2 = c(113, 101, 99, 108, 122, 92, 90, 110, 109, 95), a3 = c(96, 108, 110, 99, 118, 100, 90, 89, 102, 99), a4 = c(76, 106, 94, 124, 91, 103, 107, 106,

Re: [R] .eps files and powerpoint

2013-07-25 Thread Marc Schwartz
Hi Duncan, Based upon the subsequent exchange with Rich late yesterday, I could not replicate the problem that he was having with lattice (OSX versus Windows), so I don't believe that this is germane any longer. I also used trellis.device() just as an alternative to calling postscript()

Re: [R] Levels of a factor

2013-07-25 Thread Borja Rivier
That makes sense. Thanks all! 2013/7/24 David Carlson dcarl...@tamu.edu Benchmark is probably a subset from a larger dataframe. R does not automatically remove empty levels but you can do it: set.seed(42) dataset - data.frame(Benchmark=factor(sample(LETTERS[1:26], 50, replace=TRUE),

[R] Computing standard error of the mean using REML

2013-07-25 Thread Ebrahim Jahanshiri
Let say we have different samples taken from the same population (I am talking about soil samples and different schemes of sampling) and now we want to compare the accuracy of samples using standard error of mean. I have been asked to compute standard error of the mean of samples using residual

Re: [R] Saving multiple rda-files as one rda-file

2013-07-25 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Dark Sent: Thursday, July 25, 2013 11:00 AM To: r-help@r-project.org Subject: Re: [R] Saving multiple rda-files as one rda-file Really no one has any suggestions on this

Re: [R] Computing standard error of the mean using REML

2013-07-25 Thread Jose Iparraguirre
Dear Ebrahim, We do not deal with study or work assignments in this group. I'd suggest, nonetheless, to look into the lme4 package and the mer-class objects created with this package. Regards, José Prof. José Iparraguirre Chief Economist Age UK -Original Message- From:

Re: [R] [R-pkgs] WriteXLS Version 3.0.0 Released

2013-07-25 Thread Marc Schwartz
Hi, Perl is still required for WriteXLS. That dependency has not changed. What did change is that I removed the requirement for Text::CSV_XS, which contains C code in the Perl package source that required compilation and therefore could not be included in the WriteXLS CRAN package. The

Re: [R] .eps files and powerpoint

2013-07-25 Thread Richard M. Heiberger
your eps file appears as an icon in powerpoint 2010 and 2013 on windows 7 in my VM. the same file opens as a proper graph on powerpoint 2011 in Mac. On Wed, Jul 24, 2013 at 12:16 PM, Marc Schwartz marc_schwa...@me.comwrote: Hi Rich, Seems to work for me using Powerpoint in MS Office 2011 for

Re: [R] .eps files and powerpoint

2013-07-25 Thread Richard M. Heiberger
file2.eps opens as a graph in windows PP 2010 and as an icon in PP 2013. RPlot2.pptx https://www.dropbox.com/s/snm7cb9chrkcrff/RPlot2.pptx opens as a graph in both windows PP and in Mac PP. On Wed, Jul 24, 2013 at 2:39 PM, Marc Schwartz marc_schwa...@me.com wrote: Rich, I don't have direct

Re: [R] .eps files and powerpoint

2013-07-25 Thread Richard M. Heiberger
The Header and Prolog of both file.eps and file2.eps are the same. On Thu, Jul 25, 2013 at 9:56 AM, Richard M. Heiberger r...@temple.eduwrote: file2.eps opens as a graph in windows PP 2010 and as an icon in PP 2013. RPlot2.pptx https://www.dropbox.com/s/snm7cb9chrkcrff/RPlot2.pptx opens as

[R] Network of cities with distances as edges length

2013-07-25 Thread Edoardo Baldoni
Hello, I am building a network using a distance matrix with the package 'network' I want to create a network with cities as vertices and with the length of the edges between them that reflects their distances. How can I ? All I tried did not work I tried the following code but the result is a

Re: [R] Unable to install packages

2013-07-25 Thread David Carlson
I'd start with the home page for R: http://www.r-project.org/ because you seem to have no idea what version is current (3.0.1). You will find Google to be very helpful. As for manuals, the official documentation is at http://cran.r-project.org/manuals.html and the user contributed manuals are at

Re: [R] .eps files and powerpoint

2013-07-25 Thread Marc Schwartz
Rich, Any chance that you have access to a native Windows machine or to a colleague that does to try the files. I am wondering if there is any chance that there is something about running Office in Windows under a VM on OSX that might be involved in some manner. BTW, which VM (VMWare,

Re: [R] .eps files and powerpoint

2013-07-25 Thread Rmh
i have parallels 8 as the vm. i can try a native pc this afternoon. Sent from my iPhone On Jul 25, 2013, at 10:42, Marc Schwartz marc_schwa...@me.com wrote: Rich, Any chance that you have access to a native Windows machine or to a colleague that does to try the files. I am wondering

[R] transform dataframe with look-up table

2013-07-25 Thread Juan Antonio Balbuena
Hello I hope that there is a simple solution to this apparently complex problem. Any help will be much appreciated: I have a dataframe with Left and Right readings (that is, elements in each row are paired). For instance, Left Right [1] 98 [2] 43 [3] 2

Re: [R] x-axis (categorial variable) ordering with xyplot function (lattice package)

2013-07-25 Thread Arnaud Blaser
Dear Duncan, If you want to make a plot of the style of xyplot a numerical index of the country is needed and then use the scales argument to annote the labels with the country. I think you were right. It worked and I does seem to be the simplest option. Many thanks ! Regards, Arnaud Le

Re: [R] [R-pkgs] WriteXLS Version 3.0.0 Released

2013-07-25 Thread Orvalho Augusto
Thank you for the feedback. I installed the missing Archive::Zip packge and everthing went fine. Orvalho On Thu, Jul 25, 2013 at 3:00 PM, Marc Schwartz marc_schwa...@me.com wrote: Hi, Perl is still required for WriteXLS. That dependency has not changed. What did change is that I removed

Re: [R] SpatialPolygonsDataFrame and unique()

2013-07-25 Thread Roger Bivand
Nicola Rossi nicola.rossi20 at gmail.com writes: Hello everyone! I'm a newbie in using the RGDAL and sp packages in R and as written in the object I have a problem with a SPDF and unique(): Consider posting to the R-sig-geo list; this is not a general R question. I would have liked to

Re: [R] [R-pkgs] WriteXLS Version 3.0.0 Released

2013-07-25 Thread Marc Schwartz
Hi, Thank you. I will work on an update to the package that includes Archive::Zip so that it covers this situation. Regards. Marc On Jul 25, 2013, at 10:30 AM, Orvalho Augusto orvaq...@gmail.com wrote: Thank you for the feedback. I installed the missing Archive::Zip packge and everthing

Re: [R] transform dataframe with look-up table

2013-07-25 Thread Adams, Jean
Perhaps this will help. Jean df - structure(list(Left = c(9L, 4L, 2L, 6L, 3L, 4L, 3L, 4L, 10L, 9L), Right = c(8L, 3L, 1L, 5L, 1L, 1L, 2L, 2L, 8L, 10L)), .Names = c(Left, Right), class = data.frame, row.names = 1:10) lookup - structure(list(input = c(5L, 10L, 4L, 8L, 6L, 5L, 7L, 2L, 9L, 10L,

Re: [R] transform dataframe with look-up table

2013-07-25 Thread William Dunlap
It would be helpful if you included the expected output for your example, but I think the following does what you want by using merge() for each lookup: f0 - function(inputDF, lookupDF) { tmp1 - merge(inputDF, lookupDF, by.x=Left, by.y=input,all.x=TRUE) tmp2 - merge(tmp1, lookupDF,

Re: [R] transform dataframe with look-up table

2013-07-25 Thread Brian Diggs
On 7/25/2013 8:13 AM, Juan Antonio Balbuena wrote: Hello I hope that there is a simple solution to this apparently complex problem. Any help will be much appreciated: I have a dataframe with Left and Right readings (that is, elements in each row are paired). For instance,

Re: [R] transform dataframe with look-up table

2013-07-25 Thread David Carlson
Here's an approach that seems to work. I added an 11th case to your data since you did not have a case where both Left and Right had multiple values in the lookup table. This creates an id value so that we can merge left and right separately and then merge them back together: # Create test data

Re: [R] MGCV: Degrees of freedom of smooth terms

2013-07-25 Thread Gavin Simpson
On Tue, 2013-07-23 at 11:16 +0200, Christoph Scherber wrote: Dear all, This is just a quick question regarding degrees of freedom in GAM models fit by MGCV (using select=T): Can I roughly interpret them as: 1 df: linear effect of x on y 2 df: approximately quadratic of x on y 3 df:

Re: [R] .eps files and powerpoint

2013-07-25 Thread Richard M. Heiberger
On Vista with Powerpoint 2007, file2.eps crashes powerpoint, Once file.eps displayed, several times it crashed powerpoint. My task is now to see if ghostscript can read a pdf or ps or eps and convert it to png at res=300. Do you know the incantation for that? Rich On Thu, Jul 25, 2013 at

Re: [R] .eps files and powerpoint

2013-07-25 Thread Peter Langfelder
On Thu, Jul 25, 2013 at 9:30 AM, Richard M. Heiberger r...@temple.edu wrote: On Vista with Powerpoint 2007, file2.eps crashes powerpoint, Once file.eps displayed, several times it crashed powerpoint. My task is now to see if ghostscript can read a pdf or ps or eps and convert it to png at

Re: [R] .eps files and powerpoint

2013-07-25 Thread Marc Schwartz
Rich, That's scary. Well, I could make a comment about Vista, but that would take us in a whole new direction... ;-) As far as GS, for an EPS file to a PNG, try something along the lines of: gs -dSAFER -dBATCH -dNOPAUSE -r300 -dEPSCrop -sDEVICE=png16m -sOutputFile=file.png file.eps That

Re: [R] Saving multiple rda-files as one rda-file

2013-07-25 Thread David Winsemius
On Jul 22, 2013, at 4:18 AM, Dark wrote: Hi all, For a project we have to process some very large CSV files (up to 40 gig) To reduce them in size and increase operating performance I wanted to store them as RData files. Since it was to big I decided to split the csv and saving those parts

Re: [R] .eps files and powerpoint

2013-07-25 Thread Richard M. Heiberger
perfect. since I really want to start with pdf or ps, these work on both Mac and Windows ## rmh for pdf gs -dSAFER -dBATCH -dNOPAUSE -r300 -sDEVICE=png16m -sOutputFile=testplot.png testplot.pdf ## rmh for ps gs -dSAFER -dBATCH -dNOPAUSE -r300 -dPSCrop -sDEVICE=png16m -sOutputFile=Living.png

[R] ggplot2: further query about back to back bar plots

2013-07-25 Thread Gavin Rudge
Further to my recent post on this topic and thanks to help received already (thanks BTW), I've got back-to-back plots working nicely to give me population pyramids, with some overlaid point data from a different time period, using the code below. #packages library(ggplot2) library(reshape2)

[R] heatmap scale parameter

2013-07-25 Thread Witold E Wolski
does change only the colors but dendrograms are unaffected. d - matrix(rnorm(100),nrow=20) heatmap(d) heatmap(d,scale=column) heatmap(d,scale=row) heatmap(d,scale=none) However scaling clearly affects clustering. see: d - scale(d) heatmap(d,scale=none) R version 3.0.1 (2013-05-16) -- Good

Re: [R] ggplot2: further query about back to back bar plots

2013-07-25 Thread Rui Barradas
Hello, I'm not an expert in ggplot2 graphics but I can (partly) answer to your first question. Inline. Em 25-07-2013 18:30, Gavin Rudge escreveu: Further to my recent post on this topic and thanks to help received already (thanks BTW), I've got back-to-back plots working nicely to give me

Re: [R] How to split two levels several times?

2013-07-25 Thread Rui Barradas
Hello, I think the following does what you want. (I don't know if it makes much sense but it works.) lens - rle(as.character(XXX$electrode))$lengths m - length(lens) %/% 2 idx - rep(1:m, sapply(1:m, function(.m) sum(lens[(2*.m - 1):(2*.m)]))) if(length(lens) %% 2 != 0){ idx - c(idx,

[R] Repeated measures Cox regression ??coxph??

2013-07-25 Thread John Sorkin
Colleagues, Is there any R package that will allow one to perform a repeated measures Cox Proportional Hazards regression? I don't think coxph is set up to handle this type of problem, but I would be happy to know that I am not correct. I am doing a study of time to hip joint replacement. As

Re: [R] .eps files and powerpoint

2013-07-25 Thread David Winsemius
On Jul 25, 2013, at 9:30 AM, Richard M. Heiberger wrote: On Vista with Powerpoint 2007, file2.eps crashes powerpoint, Once file.eps displayed, several times it crashed powerpoint. My task is now to see if ghostscript can read a pdf or ps or eps and convert it to png at res=300. Do you

Re: [R] ggplot2: further query about back to back bar plots

2013-07-25 Thread Brian Diggs
On 7/25/2013 11:34 AM, Rui Barradas wrote: Hello, I'm not an expert in ggplot2 graphics but I can (partly) answer to your first question. Inline. Em 25-07-2013 18:30, Gavin Rudge escreveu: Further to my recent post on this topic and thanks to help received already (thanks BTW), I've got

Re: [R] Repeated measures Cox regression ??coxph??

2013-07-25 Thread Marc Schwartz
On Jul 25, 2013, at 2:11 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: Colleagues, Is there any R package that will allow one to perform a repeated measures Cox Proportional Hazards regression? I don't think coxph is set up to handle this type of problem, but I would be happy to know

Re: [R] Repeated measures Cox regression ??coxph??

2013-07-25 Thread David Winsemius
On Jul 25, 2013, at 12:27 PM, Marc Schwartz wrote: On Jul 25, 2013, at 2:11 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: Colleagues, Is there any R package that will allow one to perform a repeated measures Cox Proportional Hazards regression? I don't think coxph is set up to

Re: [R] constructing a daily time series

2013-07-25 Thread R. Michael Weylandt
On Mon, Jul 22, 2013 at 11:17 PM, Pascal Oettli kri...@ymail.com wrote: Hello, ?zoo Regards, Pascal 2013/7/23 shanxiao shanx...@umail.iu.edu Dear all, I have a vector of observations through day, and based on it, I try to construct a daily time series with the R function ts(), but

[R] Can't figure out why short figure won't work

2013-07-25 Thread Frank Harrell
I can't get the points and a and b to render correctly (they are squeezed into the axis) unless I make the height of the figure waste a lot of space. I'd appreciate any ideas. The code is below. Thanks! png('/tmp/z.png', width=480, height=100) par(mar=c(3,.5,1,.5)) plot.new() par(usr=c(-10,

Re: [R] Can't figure out why short figure won't work

2013-07-25 Thread Richard M. Heiberger
I tried text(.25*1500, .14, 'a', col='blue') text(.196*1500,.14, 'b', col='blue') and got improved spacing. Another option is to take control of ylim, and extend the bottom of ylim a bit lower than the automatically defined value. Rich On Thu, Jul 25, 2013 at 6:54 PM, Frank Harrell

[R] help with apply (lapply or sapply not sure)

2013-07-25 Thread Robert Lynch
I am reading in a bunch of files and then processing them all in the same way. I am sure there as a better way then to copy and past the code for each file. Here is what I've done so far InputFiles- as.character(list.files(~/ISLE/RWork/DataWarehouseMining/byCourse/)) #Path to the Course data

Re: [R] Repeated measures Cox regression ??coxph??

2013-07-25 Thread Marc Schwartz
On Jul 25, 2013, at 4:45 PM, David Winsemius dwinsem...@comcast.net wrote: On Jul 25, 2013, at 12:27 PM, Marc Schwartz wrote: On Jul 25, 2013, at 2:11 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: Colleagues, Is there any R package that will allow one to perform a repeated

Re: [R] Repeated measures Cox regression ??coxph??

2013-07-25 Thread John Sorkin
David Thank you for your thoughts. The data I am analyzing do not come from a clinical trial but rather from a cohort study whose aim is to determine risk factors for surgical therapy to treat their joints. John Sent from my iPhone On Jul 25, 2013, at 9:15 PM, Marc Schwartz

Re: [R] Can't figure out why short figure won't work

2013-07-25 Thread Jim Lemon
On 07/26/2013 08:54 AM, Frank Harrell wrote: I can't get the points and a and b to render correctly (they are squeezed into the axis) unless I make the height of the figure waste a lot of space. I'd appreciate any ideas. The code is below. Thanks! png('/tmp/z.png', width=480, height=100)

[R] simulating help

2013-07-25 Thread Ahmed Abo-Zaid
Dear all Could you please give me a link to a paper or article that explains how can I calculate type I error and power of a test using my data set by using R ? Also how can I do the same thing on a simulated data? I want this to compare between two tests I will be so grateful if you could help

[R] number of items to replace is not a multiple of replacement length

2013-07-25 Thread G Girija
Hi All, I have 5 stock values and i am calculating EWMA followed the logic as given ind following link.[ http://www.orecastingfinancialrisk.com/3.htmlhttp://www.forecastingfinancialrisk.com/3.html ] library('tseries') returns[,1]-returns[,1]-mean(returns[,1])

[R] PPML in R

2013-07-25 Thread Laurent DIDIER
Hello, I would know the command for the poisson pseudo maximum likelihood in R for my gravity equations. Thank you. Cordially Laurent [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Saving multiple rda-files as one rda-file

2013-07-25 Thread Dark
Hi, Yes maybe I should have been more clear on my problem. I want to append the different data-frames back into one variable ( rbind ) and save it as one R Data file. Regards Derk -- View this message in context:

[R] histogram with bars colored according to a vector of values

2013-07-25 Thread john d
Dear all, Let's say I have the following data.frame: dat-data.frame(x=rnorm(100), y=rnorm(100,2)) and I plot a histogram of variable x, somethink like: hist(dat$x, breaks=-5:5) Now, I'd like to color each bar according to the mean of the cases according to y. For instance, the color of the bar

[R] Multiple interaction terms in GAMM-model

2013-07-25 Thread Jeroen
Dear all, I am trying to correlate a variable tau1 to a set of other variables (x1, x2, x3, x4), taking into account an interaction with time ('doy') and place ('region'), and taking into account dependency of data in time per object ID. My dataset looks like: doy objectIDregion tau1

[R] lme (weights) and glht

2013-07-25 Thread Sibylle Stöckli
Dear R members, I tried to fit an lme model and to use the glht function of multcomp. However, the glht function gives me some errors when using weights=varPower(). The glht error makes sense as glht needs factor levels and the model works fine without weights=. Does anyone know a solution

[R] GGplot 2 – cannot get histogram and box plot axis to match.

2013-07-25 Thread John W. Clow
Problem: I am trying to get the histogram and box plot x axis to match. I’ve tried using the expand_limits function to make the axis match but that didn’t make the axis match. The histogram’s axis are still consistently larger than the ones for the box plot (though the function did help). Does