Re: [R] Generation of Normal Random Numbers

2011-01-11 Thread Michael Bedward
I realized after posting that you can also just do this... x - matrix(rnorm(25 * length(m), m, s), ncol=4, byrow=TRUE) Michael On 11 January 2011 19:13, Amelia Vettori amelia_vett...@yahoo.co.nz wrote: Dear Mr Bedward and Mr Newmiller, Thanks a lot for the guidance. Really appreciated.

Re: [R] Help with Data Transformation

2011-01-11 Thread ONKELINX, Thierry
Dear Guy, Have a look at cast() from the reshape package. You'll need something like cast(fldsampleid ~ Analysis, value = Result, data = your.data.frame) Best regards, Thierry ir. Thierry Onkelinx Instituut voor

[R] estimates in subpopulations (package survey)

2011-01-11 Thread andrija djurovic
Dear all, I have a example from library survey about estimating in subpopulations and I need to reproduce it step by step. This is the example (from paper: Estimates in subpopulation of Thomas Lumley and just instead of svymean I used svytotal) that I did in R: library(survey) data(fpc) dfpc-

[R] [R-pkgs] Package Rd2roxygen v0.1-5

2011-01-11 Thread Yihui Xie
Hi, A new version (0.1-5) of Rd2roxygen is on CRAN now. Rd2roxygen is a package to help developers transit from the raw Rd files to roxygen-style documentations, and it also has utilities to help build the package (with options to reformat the usage and examples sections). Updates:  o a new

Re: [R] Assumptions for ANOVA: the right way to check the normality

2011-01-11 Thread DrorD
Frodo Jedi wrote: What is the question you are really trying to find the answer for? Knowing that may help us give more meaningful answers. Concerning your question I thought to have been clear. I want to understand which analysis I have to use in order to understand if the

Re: [R] how to coerce part of each column of a matrix to a vector and merge them

2011-01-11 Thread Michael Bedward
Hello, The answer to this one drops out of the answer to your previous question... m - matrix(1:16, nrow=4) end - c(2,3,1,3) ii - cbind(sequence(end), rep(1:length(end), end)) x - m[ ii ] Hope this helps, Michael 2011/1/11 zhaoxing731 zhaoxing...@yahoo.com.cn: Hello Suppose I have a matrix

Re: [R] Generation of Normal Random Numbers

2011-01-11 Thread Amelia Vettori
Dear Mr Bedward and Mr Newmiller, Thanks a lot for the guidance. Really appreciated. Sagga K --- On Tue, 11/1/11, Michael Bedward michael.bedw...@gmail.com wrote: From: Michael Bedward michael.bedw...@gmail.com Subject: Re: [R] Generation of Normal Random Numbers To: saggak

[R] using Smolyak to genarate intervals

2011-01-11 Thread Lara Aleluia
Hello I am running a program from value intervals for a set of variables. I thought I could use Smolyak to get my intervals adding points as I need them , so instead of running the program for a whole interval I would run only for the most important points. I am new to Smolyak algorithm though,

Re: [R] Problems producing quantreg-Tables

2011-01-11 Thread Jan Henckens
I think I found out about the existing problem with generation of tables done by latex(): Checking the source code of 'table.R' I noticed any optional arguments specified seem to be discarded when calling the function latex.table() after preprocessing the summary.rqs-output So unlike

Re: [R] problem with packages

2011-01-11 Thread Duncan Murdoch
On 11-01-10 5:43 PM, R Heberto Ghezzo, Dr wrote: Hello, I am on a laptop with Win7, running R-2.12.1 if I click on Packages/InstallPackages I get : utils:::menuInstallPkgs() Warning: unable to access index for repository http://cran.skazkaforyou.com/bin/windows/contrib/2.12 Warning: unable

Re: [R] problem with packages

2011-01-11 Thread Uwe Ligges
On 10.01.2011 23:43, R Heberto Ghezzo, Dr wrote: Hello, I am on a laptop with Win7, running R-2.12.1 if I click on Packages/InstallPackages I get : utils:::menuInstallPkgs() Warning: unable to access index for repository http://cran.skazkaforyou.com/bin/windows/contrib/2.12 Warning: unable

[R] [R-pkgs] Package animation update 2.0-1

2011-01-11 Thread Yihui Xie
Hi, The package animation 2.0-1 is on CRAN now (http://cran.r-project.org/package=animation).                  CHANGES IN animation VERSION 2.0-1 NEW FEATURES    o demo('Xmas_card') contributed by Yuan Huang    o demo('flowers') to show how to download images from the Internet  and create

Re: [R] ThinkCell type waterfall charts in R?

2011-01-11 Thread Jim Lemon
On 01/11/2011 09:20 AM, ang wrote: I was actually looking to create a similar type of graph in R. But I guess I am going to try to approach it by using a stacked column chart and hiding the 'net' series, while only showing the increases/decreases in value. I'll post an update later on what I

[R] sorting question

2011-01-11 Thread Albert-Jan Roskam
Hi, I have a data frame with variables a, b, c (character vars) and t (time var, could be represented as POSIXct or character, depending on which is most useful. The format is -mm-dd hh:mm:ss CET). Now, I want to sort the data frame in ascending order by a, b, c and then in descending

Re: [R] Rectangle height in lattice xyplot key

2011-01-11 Thread Duncan Mackay
Hi Deepayan Thank you very much for the update to lattice and the solution. For the current problem the texts are all single lines and the solution works well. The example was to accentuate the problem and I thought that it would be useful in the future. I was able to make all the heights

Re: [R] sorting question

2011-01-11 Thread Albert-Jan Roskam
Got it, after rtmíng I realized I had to use xtfrm: ord - order(c(idvars, -xtfrm(t))) myData[ord, ]   It's downright ugly, as it confronts the user with some implementation detail (cf SAS or SPSS), but well, it works. Cheers!! Albert-Jan

[R] Add line to plot from stl decomposed time series?

2011-01-11 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I would like to add a line to the plot of the data panel of a stl decomposed time series. Example: plot(stl(nottem, per)) plots a 4(or is t 8?) panel graph. I thought that I might be able to use mfg to plot in the top (left?) panel (data), but

[R] gennerating skewed random numbers

2011-01-11 Thread Ed Keith
This is not exactly an R specific question, but I think the people on this list can probably help. I'm working on a simulation. In the model I have the first three moments of the distributions of the variables. I know how to generate a random number from a distribution given the first two

Re: [R] how to calculate this natural logarithm

2011-01-11 Thread Mike Marchywka
Date: Sun, 9 Jan 2011 12:57:49 + From: c...@witthoft.com To: r-help@r-project.org Subject: Re: [R] how to calculate this natural logarithm You could re-do part of your code to run with mpfr-class variables, and use this function: # mpfr choose(n,k) rmpfac-function(n,k,prec=50)

Re: [R] From vector to a step function

2011-01-11 Thread Alaios
Dear Jim Holtman, I would like to thank you for your help. Just to update also the community that worked fine :) Best Regards Alex --- On Mon, 1/10/11, jim holtman jholt...@gmail.com wrote: From: jim holtman jholt...@gmail.com Subject: Re: [R] From vector to a step function To: Alaios

[R] Postscript function Bug at R x64 2.12.1?

2011-01-11 Thread Rodrigo Aluizio
Hi list. I was saving my modified pairs graphic using a custom panel from the R Graphics site, and I got an interesting difference in the final image when I save it as eps or png. This custom panel make possible to show at the left side of the pairs plot the p-value as symbol and the correlation

[R] Postscript function Bug at R x64 2.12.1?

2011-01-11 Thread Rodrigo Aluizio
Hi, a correction in the previous script. Anyone who tries to use it must ignore (remove) the [,-7] after the Grupos object. Sorry. De: Rodrigo Aluizio [mailto:r.alui...@gmail.com] Enviada em: terça-feira, 11 de janeiro de 2011 11:01 Para: R Help Assunto: Postscript function Bug at R x64

[R] using R on an php webapp

2011-01-11 Thread mihai
i write an php R web app on a linux server that takes an user input matrix (20X20) and makes an Multidimensional Scaling calculation. Now my answer is, can R support (let's say) 1000 requests per second? (my app is intended to be use on facebook) What's the best way, use R as a server, deployng

[R] Confidence interval on quantile regression predictions

2011-01-11 Thread Davey, Andrew
I am using the quantreg package to build a quantile regression model and wish to generate confidence intervals for the fitted values. After fitting the model, I have tried running predict() and predict.rq(), but in each case I obtain a vector of the fitted values only. For example:

Re: [R] Real time dataset

2011-01-11 Thread Daróczi Gergely
Hello, this little example my work for demo purposes: x1 = runif(45) x2 = runif(45) x3 = runif(45) df = data.frame(x1=x1,x2=x2,x3=x3) test - function(df, values, n) { if (nrow(df) n) { df - rbind(df, values) } else { df[1:(nrow(df)-1),] - df[2:nrow(df),] df[n,] - values } return(df) } for

Re: [R] Meaning of pterms in survreg object?

2011-01-11 Thread Terry Therneau
I'm having a hard time fathoming your question, since pterms appears nowhere in my source code to residuals.survreg. Can we start at the beginning, per the posting guide? 1. What version of R are you running? 2. What exactly are the statements you typed which give the message? Note that

Re: [R] Global variables

2011-01-11 Thread Sebastien Bihorel
Thanks, I will have a look at it. Sebastien Michael Bedward wrote: Hi Sebastian, You might also find the proto package useful as a way of restricting the scope of variables. It provides a more intuitive (at least to me) way of packaging variables and functions up into environments that can

Re: [R] Confidence interval on quantile regression predictions

2011-01-11 Thread Roger Koenker
You need to add explicitly newdata = list(x=x) and if you want percentile method you also need se = boot. Roger Koenker rkoen...@illinois.edu On Jan 11, 2011, at 3:54 AM, Davey, Andrew wrote: I am using the quantreg package to build a quantile regression model and wish to generate

Re: [R] Interpolate xts

2011-01-11 Thread Joshua Ulrich
Use na.approx: set.seed(21) x - xts(rnorm(10), Sys.time()-10:1) is.na(x) - 2:4 is.na(x) - 8:9 na.approx(x) na.spline(x) Best, -- Joshua Ulrich  |  FOSS Trading: www.fosstrading.com On Tue, Jan 11, 2011 at 12:08 AM, Rustamali Manesiya rmanes...@gmail.com wrote: Hello,       I have a xts

[R] Catch separability problems in a (multinom) regression

2011-01-11 Thread sovo0815
So far I have learned that a binary logit model can either not converge or show linear separability (two different warnings). And so far I assume that this is also the case for multinomial models. For these models, if such errors occur, the coefficients are not very useful. In a loop

Re: [R] rprofile.site

2011-01-11 Thread PtitBleu
Hello Julian, I'm not sure my answer will be very helpful to you but it seems that Tinn-R looks for Rprofile.site at the old place (R/bin/etc). With the new R configuration, this file is in now R/bin. Maybe you can try to copy the Rprofil.site file to the place expected by Tinn-R. I also found

Re: [R] Help with Data Transformation

2011-01-11 Thread Hadley Wickham
The data is initially extracted from an SQL database into Excel, then saved as a tab-delimited text file for use in R. You might also want to look at the SQL packages for R so you can skip this manual step. I'd recommend starting with

[R] list concatenation

2011-01-11 Thread Georg Otto
Dear R gurus, first let me apologize for a question that might hve been answered before. I was not able to find the solution yet. I want to concatenate two lists of lists at their lowest level. Suppose I have two lists of lists: list.1 - list(I=list(A=c(a, b, c), B=c(d, e, f)),

[R] scaling to multiple data files

2011-01-11 Thread Jason Edgecombe
Hello, I have logging information for multiple machines, which I am trying to summarize and graph. So far, I process each host individually, but I would like to summarize the user count across multiple hosts. I want to answer the question how many unique users logged in on a certain day

Re: [R] list concatenation

2011-01-11 Thread Joshua Wiley
Hi Georg, This was an interesting challenge to me. Here's what I came up with. The first option meets your desired result, but could get messy with deeper nesting. The second is less code, but is not quite what you want and requires as.data.frame() to give a reasonable result for each list.

Re: [R] scaling to multiple data files

2011-01-11 Thread jim holtman
I am not sure exactly what your data represents. For example, from looking at the data it appears that user1 and user2 have been logged on for about 4 days; is that what the data is saying? If you are keeping track of users, why not write out a file that has the start/end time for each user's

Re: [R] Match numeric vector against rows in a matrix?

2011-01-11 Thread Kevin Ummel
Hi Petr, Sorry for the delay. I ended up implementing a simple and fast but not-universal or elegant solution, since it turned out that I only needed to test a rather small subset of combinations for my purposes. Nevertheless, I did go back and try the solutions posted. Bill's 'binary

Re: [R] list concatenation

2011-01-11 Thread Charles C. Berry
On Tue, 11 Jan 2011, Georg Otto wrote: Dear R gurus, first let me apologize for a question that might hve been answered before. I was not able to find the solution yet. I want to concatenate two lists of lists at their lowest level. Suppose I have two lists of lists: list.1 -

Re: [R] list concatenation

2011-01-11 Thread Bert Gunter
Lists are (isomorphic to) trees with (possibly) labelled nodes. A completely general solution in which two trees have possibly different topologies and different labels would therefore involve identifying the paths to leaves on each tree, e.g. via depth first search using recursion, and unioning

[R] glm specification where response is a 2col matrix

2011-01-11 Thread Uwe Ligges
Hi, when I apply a glm() model in two ways, first with the response in a two column matrix specification with successes and failures y - matrix(c( 5, 1, 3, 3, 2, 2, 0, 4), ncol=2, byrow=TRUE) X - data.frame(x1 = factor(c(1,1,0,0)), x2 = factor(c(0,1,0,1)))

Re: [R] glm specification where response is a 2col matrix

2011-01-11 Thread Prof Brian Ripley
Your first model is a binomial glm witb 4 observations of 6,6,4,4 trials. Your second model is a Bernoulli glm with 20 observations of one trial each. The saturated models are different, as are the likelihoods (unsurprising given the data is different): the binomial model has comnbinarial

[R] adding plots to existent multiuple plots

2011-01-11 Thread Jannis
Dear list members, does anybody know a way how to add plots to already existing subplots created with layout? I have created two subplots via layout(matrix(1:2)) and would like to add different plots to each of them. As I need to load data in between I need to add a plot to the first

Re: [R] list concatenation

2011-01-11 Thread David Katz
Without any error checking, I'd try this: recurse - function(l1,l2){ if(is(l1[[1]],list)) mapply(recurse,l1,l2,SIMPLIFY=F) else {mapply(c,l1,l2,SIMPLIFY=F)} } recurse(list.1,list.2) which recursively traverses each tree (list) in tandem until one is not composed of

[R] Writing diagonal matrix in opposite direction

2011-01-11 Thread Ron Michael
Hi, is there any direct R function to write an diagonal matrix in an opposite way? for example I want to get like:   diag(rnorm(5))[,5:1]    [,1]   [,2]   [,3]  [,4]   [,5] [1,]  0.000  0.000  0.000  0.00 -0.1504687 [2,]  0.000  0.000  0.000

[R] how to sort new data frame based on the original data frame

2011-01-11 Thread wangwallace
I have a really simple question I have a data frame of 8 variables (the first column is the subjects' id): SubID G1G2 G3 G4W1W2 W3W4 1 6 5 6 2 6 22 4 2 6 4 7 2 6

Re: [R] Writing diagonal matrix in opposite direction

2011-01-11 Thread RICHARD M. HEIBERGER
x - 1:5 diag(x)[rev(seq(length(x))),] On Tue, Jan 11, 2011 at 12:56 PM, Ron Michael ron_michae...@yahoo.comwrote: Hi, is there any direct R function to write an diagonal matrix in an opposite way? for example I want to get like: diag(rnorm(5))[,5:1] [,1] [,2] [,3]

[R] Alphabetic labels on multi-plot graphics

2011-01-11 Thread Eduardo de Oliveira Horta
Is there a way to achieve lbl=c(a, b, c, d) par(mfrow=c(2,2), ann=FALSE) for (t in 1:4){ plot(seq(from=1,to=2*pi,length=100), sin(t*seq(from=1,to=2*pi,length=100)), type=l) title(main=paste((, lbl[t], ), sep=)) } without having to use an object like 'lbl'? More generally: is it possible to

[R] Displaying a PLS biplot under a 3d surface plot

2011-01-11 Thread Lorenzen, Ted {Quaker}
All: Anyone have an idea about how to plot a PLS biplot on the x-y plane under a 3-D surface? Preferably a 3-D surface such as one created with rgl.surface() (meaning, I would love an interactive plot when all is said and done). I have seen examples which combine a 3-d surface with contour

Re: [R] ThinkCell type waterfall charts in R?

2011-01-11 Thread ang
Hi Jim, I looked through the plotrix documentation, and the waterfall plot comes from the stackpoly function right? I'm not sure if I can modify the stackpoly to create the plot I want, since stackpoly is a line plot and fills the area under with color. I haven't played with all the options

Re: [R] how to sort new data frame based on the original data frame

2011-01-11 Thread Joshua Wiley
Hi, On Tue, Jan 11, 2011 at 9:19 AM, wangwallace talentt...@gmail.com wrote: I have a really simple question I have a data frame of 8 variables (the first column is the subjects' id):    SubID     G1    G2     G3     G4    W1    W2      W3    W4      1          6      5       6       2    

Re: [R] adding plots to existent multiuple plots

2011-01-11 Thread Jannis
Okseems as I found a way. For anybody looking for a similar solution: ?split.screen Cheers Jannis --- Jannis bt_jan...@yahoo.de schrieb am Di, 11.1.2011: Von: Jannis bt_jan...@yahoo.de Betreff: [R] adding plots to existent multiuple plots An: r-help@r-project.org Datum: Dienstag, 11.

Re: [R] Alphabetic labels on multi-plot graphics

2011-01-11 Thread David Winsemius
On Jan 11, 2011, at 2:06 PM, Eduardo de Oliveira Horta wrote: Is there a way to achieve lbl=c(a, b, c, d) opar - par(mfrow=c(2,2), ann=FALSE) for (t in 1:4){ plot(seq(from=1,to=2*pi,length=100), sin(t*seq(from=1,to=2*pi,length=100)), type=l) title(main=paste((, lbl[t], ), sep=)) }

[R] A question on dummy variable

2011-01-11 Thread Christofer Bogaso
Dear all, I would like to ask one question related to statistics, for specifically on defining dummy variables. As of now, I have come across 3 different kind of dummy variables (assuming I am working with Seasonal dummy, and number of season is 4): dummy1 - diag(4) for(i in 1:3) dummy1 -

Re: [R] scaling to multiple data files

2011-01-11 Thread Jason Edgecombe
That's correct, those users have been logged in or had processes running on this machine for four days. The machines in question are time-sharing Linux servers for college students and professors to use. multi-day jobs are common. The last command does what you suggest, but it doesn't capture

Re: [R] A question on dummy variable

2011-01-11 Thread Bert Gunter
R does not use dummy variables. Models and contrasts are specified in more natural, model formula based ways. See ?arima and/or CRAN's Time Series task view for numerous packages that fit time series. -- Bert On Tue, Jan 11, 2011 at 12:18 PM, Christofer Bogaso bogaso.christo...@gmail.com

Re: [R] Assumptions for ANOVA: the right way to check the normality

2011-01-11 Thread Greg Snow
From: Frodo Jedi [mailto:frodo.j...@yahoo.com] Sent: Monday, January 10, 2011 5:44 PM To: Greg Snow Cc: r-help@r-project.org Subject: Re: [R] Assumptions for ANOVA: the right way to check the normality Dear Greg, first of all thanks for your reply. And I add also many thanks to all of

Re: [R] A question on dummy variable

2011-01-11 Thread David Winsemius
You are not offering example of real codings but are rather showing something1 that you think looks like something2 (in R) that looks like something3 (in a textbook?). My guess is that the something2 might be contrast matrices or model matrices. If you want a contrast matrix whose columns

Re: [R] Assumptions for ANOVA: the right way to check the normality

2011-01-11 Thread Frodo Jedi
Many many thanks for your feedback Greg. You have been very enlightening for me. Now is time for me to study the material you kindly provided me. Thanks. From: Greg Snow greg.s...@imail.org Cc: r-help@r-project.org r-help@r-project.org Sent: Tue, January

Re: [R] Alphabetic labels on multi-plot graphics

2011-01-11 Thread Eduardo de Oliveira Horta
Thanks, I wasn't even aware that 'letters' was there. Best regards On Tue, Jan 11, 2011 at 6:08 PM, David Winsemius dwinsem...@comcast.net wrote: On Jan 11, 2011, at 2:06 PM, Eduardo de Oliveira Horta wrote: Is there a way to achieve lbl=c(a, b, c, d) opar - par(mfrow=c(2,2), ann=FALSE)

[R] aggregate.formula implicitly removes rows containing NA

2011-01-11 Thread Dickison, Daniel
The documentation for `aggregate` makes it sound like aggregate.formula should behave identically to aggregate.data.frame (apart from the way the parameters are passed). But it looks like aggregate.formula is quietly removing rows where any of the output variables (those on the LHS of the

Re: [R] Strange behavior when trying to piggyback off of fitdistr

2011-01-11 Thread emorway
Avi, Its been nearly a year since you made this post, but I'm curious if you were able to find a solution to your problem? Your inquiry is closely related to a problem I'm having. Thanks, Eric -- View this message in context:

Re: [R] gennerating skewed random numbers

2011-01-11 Thread Michael Bedward
Hi Ed, The sn package can generate random values from skewed Normal and t distributions. Also see here: http://azzalini.stat.unipd.it/SN/faq-r.html Michael On 11 January 2011 23:37, Ed Keith e_...@yahoo.com wrote: This is not exactly an R specific question, but I think the people on this

Re: [R] aggregate.formula implicitly removes rows containing NA

2011-01-11 Thread David Winsemius
On Jan 11, 2011, at 5:41 PM, Dickison, Daniel wrote: The documentation for `aggregate` makes it sound like aggregate.formula should behave identically to aggregate.data.frame (apart from the way the parameters are passed). But it looks like aggregate.formula is quietly removing rows

[R] Problems creating a PNG file for a dendrogram: Error in plot.window(...) : need finite 'xlim' values

2011-01-11 Thread Richard Vlasimsky
Has anyone successfully created a PNG file for a dendrogram? I am able to successfully launch and view a dendrogram in Quartz. However, the dendrogram is quite large (too large to read on a computer screen), so I am trying to save it to a file (1000x4000 pixels) for viewing in other apps.

Re: [R] Problems creating a PNG file for a dendrogram: Error in plot.window(...) : need finite 'xlim' values

2011-01-11 Thread Peter Langfelder
I'm guessing that your code actually generates two plots, one with the command p - plot(hc) and one with plot(p), which doesn't work for a png. Try getting rid of the plot(p). Peter On Tue, Jan 11, 2011 at 4:01 PM, Richard Vlasimsky richard.vlasim...@imidex.com wrote: Has anyone successfully

Re: [R] A question on dummy variable

2011-01-11 Thread Gabor Grothendieck
On Tue, Jan 11, 2011 at 3:18 PM, Christofer Bogaso bogaso.christo...@gmail.com wrote: Dear all, I would like to ask one question related to statistics, for specifically on defining dummy variables. As of now, I have come across 3 different kind of dummy variables (assuming I am working with

Re: [R] Problems creating a PNG file for a dendrogram: Error in plot.window(...) : need finite 'xlim' values

2011-01-11 Thread Bill.Venables
I very much doubt your first example does work. the value of plot() is NULL which if you plot again will give the error message you see in your second example. What where you trying to achieve doing p - plot(hc) plot(p) ### this one is trying to plot NULL ? Here is an example

Re: [R] aggregate.formula implicitly removes rows containing NA

2011-01-11 Thread Peter Ehlers
On 2011-01-11 14:41, Dickison, Daniel wrote: The documentation for `aggregate` makes it sound like aggregate.formula should behave identically to aggregate.data.frame (apart from the way the parameters are passed). But it looks like aggregate.formula is quietly removing rows where any of the

Re: [R] aggregate.formula implicitly removes rows containing NA

2011-01-11 Thread Dickison, Daniel
Oh wow, that would be it. Not sure how I missed that. Thanks for the tip. Sent from my iPhone On Jan 11, 2011, at 18:56, David Winsemius dwinsem...@comcast.net wrote: On Jan 11, 2011, at 5:41 PM, Dickison, Daniel wrote: The documentation for `aggregate` makes it sound like

Re: [R] Problems creating a PNG file for a dendrogram: Error in plot.window(...) : need finite 'xlim' values

2011-01-11 Thread David Winsemius
On Jan 11, 2011, at 7:01 PM, Richard Vlasimsky wrote: Has anyone successfully created a PNG file for a dendrogram? I am able to successfully launch and view a dendrogram in Quartz. However, the dendrogram is quite large (too large to read on a computer screen), so I am trying to save it

[R] how to change strip text of effect plot

2011-01-11 Thread Wincent
Dear r heper, How can I change the strip text, for example (16,23] in the following example, to other more informative text such as high level on the fly? library(effects) Cowles$ex2 - cut(Cowles$extraversion,3) mod.cowles - glm(volunteer ~ sex+neuroticism*ex2,data=Cowles, family=binomial)

Re: [R] Problems creating a PNG file for a dendrogram: Error in plot.window(...) : need finite 'xlim' values

2011-01-11 Thread David Winsemius
On Jan 11, 2011, at 9:27 PM, David Winsemius wrote: On Jan 11, 2011, at 7:01 PM, Richard Vlasimsky wrote: Has anyone successfully created a PNG file for a dendrogram? I am able to successfully launch and view a dendrogram in Quartz. However, the dendrogram is quite large (too large to

Re: [R] A question on dummy variable

2011-01-11 Thread John Sorkin
Christofer, I am not sure I understand how you are using your dummy variables. Generally if you have n categories you need n-1 dummy variables. Thus if you have three categories, low, medium, high and want to compare two of the levels to a reference level (a coding scheme sometimes called

[R] GLMM with lme4 and octopus behaviour

2011-01-11 Thread Samaritan
Hi all, First time poster and a relatively new R user, I'm beginning analysis for my masters degree. I'm doing a bit of work on octopus behaviour, and while it's been fascinating, the stats behind it are a bit beyond my grasp at the moment. I was hoping that somebody with more experience my be

Re: [R] how to change strip text of effect plot

2011-01-11 Thread Joshua Wiley
Hi, I am guessing this is not what you meant by on the fly, but I think it will be by far the easiest way. Plotting an effects object is a high level plot with a lot of defaults and automation built in to make your life simple. The cost is that it is less flexible---you work its way, not vice

Re: [R] how to change strip text of effect plot

2011-01-11 Thread Wincent
Sure that is one way to go. Since it is possible to pass lattice arguments to that high level function, and there should be ways to relabel/custom the strip text in the lattice plotting system, I would think such an indirect method a last resort. Thank you. Ronggui On 12 January 2011 11:51,

Re: [R] Aggragating subsets of data in larger vector with sapply

2011-01-11 Thread Joshua Ulrich
Hi Chris, This seems to work on the sample data you provided. FUN - function(x) { x - xts(as.numeric(x),index(x)) period.apply(x, endpoints(x,secs), sum) } lapply(split.default(xSym$Size,xSym$Direction), FUN) Best, -- Joshua Ulrich  |  FOSS Trading: www.fosstrading.com On Sun, Jan 9,

Re: [R] how to change strip text of effect plot

2011-01-11 Thread Joshua Wiley
Hmm, I felt like it was the clearest, most direct way. Then again, things of this nature (overide defaults using arguments rather than changing what you feed the functions) do seem to be a common request both for lattice and ggplot2. In any case, my memory of the lattice book and a quick search

[R] plot: skip a range of axis

2011-01-11 Thread Yuan Jian
Hi, I am using plot to show scatter points in 2_D. in my data, there is no data between -1 and +1 in x-axis. I want to skip this region, i.e. x axis becomes [-Inf:-1, 1:Inf]. can any one tell me how to do? YU [[alternative HTML version deleted]]

Re: [R] GLMM with lme4 and octopus behaviour

2011-01-11 Thread Ben Bolker
Samaritan d.harliwich at gmail.com writes: [snip] You might want to ask follow-up questions on the R-sig-mixed-models list At the most basic level, I'm testing the effect of sleep deprivation on various behaviours (e.g. amount of time spent awake, amount of time spend expressing

[R] extracting more information from optim in R?

2011-01-11 Thread Steve Su
Dear All, I am in the process of translating some of my functions into C and one such function sometimes get stuck when I applied optim. The pure R codes work fine but the translated C codes occasionally get stuck and I like to find out why. Is it possible to extract the parameters of

[R] Degrees of freedom

2011-01-11 Thread Umit Tokac
Hello, I have a little problem about degree of freedom in R. if you can help me, I will be happy. I used nlme function to analyze my data and run the linear mixed effects model in R. I did the linear mixed effect analysis in SAS and SPSS as well. However, R gave the different degrees of freedom