Re: [R] I want to use Sweave, but only sometimes

2009-04-14 Thread cameron.bracken
cls59 wrote: Currently pgfSweave is only available from rforge.net and is very much in beta. Well, that said, you can install the latest build using: install.packages(pgfSweave, repos=http://R-Forge.R-project.org;) then for the documentation: ?pgfSweave AND vignette(pgfSweave)

Re: [R] I want to use Sweave, but only sometimes

2009-04-14 Thread cameron.bracken
P.S. pgfSweave does include caching of figures as a feature. See the vignette for details. -- View this message in context: http://www.nabble.com/I-want-to-use-Sweave%2C-but-only-sometimes-tp23026260p23033731.html Sent from the R help mailing list archive at Nabble.com.

[R] Building GUI for custom R application

2009-04-14 Thread Harsh
HI R users, I would appreciate information/examples/suggestions on building GUIs for R applications. I am currently working on a project that would require the following functionalities : 1) Display a window to the user. Provide a function to scan local drive and choose dataset file. 2) Display

Re: [R] Fedora 10 KDE plasma font rendering issue

2009-04-14 Thread Martyn Plummer
On Sun, 2009-04-12 at 13:19 +0100, Paul Bivand wrote: I checked with my KDE 4.2 (Mandriva 2009 system, kde.org binaries) with no font rendering issues in running demo(graphics). It is quite possible that pango was not installed with Fedora (as it is unnecessary for KDE 4.2 systems).

Re: [R] any other fast method for median calculation

2009-04-14 Thread S Ellison
Sorting with an appropriate algorithm is nlog(n), so it's very hard to get the 'exact' median any faster. However, if you can cope with a less precise median, you could use a binary search between max(x) and min(x) with low tolerance or comparatively few iterations. In native R, though, that isn;t

Re: [R] any other fast method for median calculation

2009-04-14 Thread Matthias Kohl
there is function rowMedians in Bioconductor package Biobase which works for numeric matrices and might help. Matthias Dimitris Rizopoulos wrote: S Ellison wrote: Sorting with an appropriate algorithm is nlog(n), so it's very hard to get the 'exact' median any faster. However, if you can cope

[R] Odp: Plot legend

2009-04-14 Thread Petr PIKAL
Hi When I tried to make a plot according to your code I got plot(CO2ppm_1$CO2_ppm,ylim=c(-7,10), + axes = FALSE,type=b,pch=16,cex=1,col=skyblue4,main=TC (Model AM2t) SPL Mean Diurnal Cycle,xlab=Hours (GMT),ylab=CO2(ppm),col.main=black,font.main=4,lwd=1.8,col.lab=black,col.sub=Black) Error in

Re: [R] any other fast method for median calculation

2009-04-14 Thread Dimitris Rizopoulos
S Ellison wrote: Sorting with an appropriate algorithm is nlog(n), so it's very hard to get the 'exact' median any faster. However, if you can cope with a less precise median, you could use a binary search between max(x) and min(x) with low tolerance or comparatively few iterations. In native R,

[R] using Sweave, how to save a plot in a given size

2009-04-14 Thread Lore M
Hi, I'm trying to realise a repport with R and Latex (TeXnicCenter and Miktex for Windows) using Sweave(). I'd like to save my plots in a given size. How can I do that ? The code is : \SweaveOpts{prefix.string = figs/plot, eps = FALSE, pdf = TRUE} partI, echo=FALSE ,fig=TRUE,

Re: [R] Building GUI for custom R application

2009-04-14 Thread Barry Rowlingson
On Tue, Apr 14, 2009 at 9:23 AM, Harsh singhal...@gmail.com wrote: HI R users, I would appreciate information/examples/suggestions on building GUIs for R applications. I am currently working on a project that would require the following functionalities : 1) Display a  window to the user.

Re: [R] Faster Solution for a simple code?

2009-04-14 Thread Petr PIKAL
Hi this one could be slightly quicker but i am not completely sure because it gives me different results from yours set.seed(111) x-x1-x2- data.frame(a=sample(1:50, 1, replace=T), b=sample(100:500, 1, replace=T)) y- data.frame(a=sample(1:50, 1, replace=T), b=sample(100:500, 1,

Re: [R] Building GUI for custom R application

2009-04-14 Thread Gabor Grothendieck
On Tue, Apr 14, 2009 at 6:54 AM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Tue, Apr 14, 2009 at 9:23 AM, Harsh singhal...@gmail.com wrote: HI R users, I would appreciate information/examples/suggestions on building GUIs for R applications. I am currently working on a project

[R] Histogram and moving average

2009-04-14 Thread Vallat Morgan
Hi everyone, I have a 'basic' issue and hope someone has a bit of code to solve it. I have two populations plotted as histograms on the same figure. Basically I want to add the moving average (based on hist) for both populations on my graph. I'm also interested in the x coordinate of the curves

[R] matching lists

2009-04-14 Thread Manoel Silva
Dear All,   Here's my problem. I have two lists:   v [[1]] [1] five [[2]] [1] four [[3]] [1] three [[4]] [1] two [[5]] [1] one [[6]] [1] six [[7]] [1] five  four  three two   one   six  [[8]] [1] four  three two   one   six  [[9]] [1] three two   one   six  [[10]] [1] two one six   and the

[R] Decomposition of time series with forecast package

2009-04-14 Thread djhurio
Hi! I am exploring the forecast package (http://www.robjhyndman.com/ index.php?option=com_contenttask=viewid=55Itemid=71). I am doing ARIMA modelling with auto.arima() function. Is it possible to get the decomposition of a time series using the model found by auto.arima()? I would like to

Re: [R] Question on zero-inflated Poisson count data with r epeated measures design - glmm.ADMB

2009-04-14 Thread David Winsemius
Strubbe Diederik diederik.strubbe at ua.ac.be writes: Dear R community, I have some questions regarding the analysis of a zero-inflated count dataset and repeated measures design. The dataset is arranged as follows : Unit of analysis: point - these are points were bird were counted

Re: [R] using Sweave, how to save a plot in a given size

2009-04-14 Thread Wolfgang Raffelsberger
Hi I do somthing like: \SweaveOpts{prefix.string=proj1} label=fig1,fig=T,include=F,width=8, height=12= plot(1:10) @ \begin{figure} \includegraphics {proj1-fig1} %% show \label{..} \end{figure} Wolfgang Lore M a écrit : Hi, I'm trying to realise a repport with R and Latex

Re: [R] Building GUI for custom R application

2009-04-14 Thread Gabor Grothendieck
It hasn't been updated in years but this page lists some possibilities for R GUI's: http://www.sciviews.org/_rgui/ On Tue, Apr 14, 2009 at 4:23 AM, Harsh singhal...@gmail.com wrote: HI R users, I would appreciate information/examples/suggestions on building GUIs for R applications. I am

[R] cbind

2009-04-14 Thread emj83
I have a list of numbers with NAs as below: A[,1] [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [19] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [37] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [55] NA

Re: [R] Schoenfeld residuals

2009-04-14 Thread Laura Bonnett
Hi, Thank you for your comments and apologies for the delay in replying. rem.Rcens =1 for the censored variables. The problem arises because I am not strictly looking at time to death. Instead I am looking at time to 12-month remission in epilepsy. Therefore a lot of people have the same event

Re: [R] any other fast method for median calculation

2009-04-14 Thread roger koenker
There is a slightly faster algorithm in my quantreg package, see kuantile() but this is only significant when sample sizes are very large. In your case you really need a wrapper that keeps the loop over columns within some lower level language. url:www.econ.uiuc.edu/~roger

[R] Odp: matching lists

2009-04-14 Thread Petr PIKAL
Hi lapply should do it if values is a data frame with first column of names and second column numbers. lapply(v, function(x) values[match(x, values[ ,1]), 2]) Regards Petr r-help-boun...@r-project.org napsal dne 14.04.2009 14:01:50: Dear All, Here's my problem. I have two lists: v

Re: [R] cbind

2009-04-14 Thread Dimitris Rizopoulos
try this: x - c(rep(NA, 20), sample(100, 25)) n.na - sum(is.na(x)) cbind(seq(-n.na, length(x) - n.na - 1), x) I hope it helps. Best, Dimitris emj83 wrote: I have a list of numbers with NAs as below: A[,1] [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA

Re: [R] matching lists

2009-04-14 Thread baptiste auguie
Try this, numbers - c(one,two,three,four) values - c(10,20,30,40) v - list(sample(numbers,3),sample(numbers,2)) v sapply(v,function(.l) values[match(.l, numbers)] ) HTH, baptiste On 14 Apr 2009, at 13:01, Manoel Silva wrote: Dear All, Here's my problem. I have two lists: v [[1]] [1]

Re: [R] cbind

2009-04-14 Thread Mike Lawrence
a=c(NA,NA,2,3,NA,NA,NA) which.min(is.na(a)) [1] 3 b=1:length(a) b-3 [1] -2 -1 0 1 2 3 4 cbind(b=b-3,a=a) b a [1,] -2 NA [2,] -1 NA [3,] 0 2 [4,] 1 3 [5,] 2 NA [6,] 3 NA [7,] 4 NA On Tue, Apr 14, 2009 at 7:20 AM, emj83 stp08...@shef.ac.uk wrote: I have a list of

Re: [R] cbind

2009-04-14 Thread Mike Lawrence
oops, of course I meant: a=c(NA,NA,2,3,NA,NA,NA) b=1:length(a) cbind(b=b-which.min(is.na(a)),a=a) On Tue, Apr 14, 2009 at 9:43 AM, Mike Lawrence mike.lawre...@dal.ca wrote: a=c(NA,NA,2,3,NA,NA,NA) which.min(is.na(a)) [1] 3 b=1:length(a) b-3 [1] -2 -1  0  1  2  3  4 cbind(b=b-3,a=a)      

Re: [R] cbind

2009-04-14 Thread Mike Lawrence
Unfortunately Dimitris' solution fails in the face of NA padding on both sides of the numeric data, as in Emma's original example. x - c(rep(NA, 20), sample(100, 25), rep(NA,20)) On Tue, Apr 14, 2009 at 9:40 AM, Dimitris Rizopoulos d.rizopou...@erasmusmc.nl wrote: try this: x - c(rep(NA,

Re: [R] cbind

2009-04-14 Thread Dimitris Rizopoulos
Yes, indeed! Best, Dimitris Mike Lawrence wrote: Unfortunately Dimitris' solution fails in the face of NA padding on both sides of the numeric data, as in Emma's original example. x - c(rep(NA, 20), sample(100, 25), rep(NA,20)) On Tue, Apr 14, 2009 at 9:40 AM, Dimitris Rizopoulos

Re: [R] Histogram and moving average

2009-04-14 Thread Dieter Menne
Vallat Morgan morgan.vallat at epfl.ch writes: I have a 'basic' issue and hope someone has a bit of code to solve it. I have two populations plotted as histograms on the same figure. Basically I want to add the moving average (based on hist) for both populations on my graph. I'm also

Re: [R] fractal vs. Fractal packages

2009-04-14 Thread Kjetil Halvorsen
google gives nothing, and the archive section on CRAN has no Fractal. On Mon, Apr 13, 2009 at 10:31 PM, Erin Hodgess erinm.hodg...@gmail.comwrote: Dear R People: At one time, there were packages called fractal and Fractal, respectively, which had different functions. I can't seem to find

Re: [R] Question on zero-inflated Poisson count data with repeatedmeasures design - glmm.ADMB

2009-04-14 Thread ONKELINX, Thierry
Dear Diederik, If you revisited the same points then it makes sense to use the data at the point level. But then I would mke that explicit by using a nested random effect. In the nlme/lme4 syntax: 1|Site/Point. Make shure that each point has a unique ID. Naming a variable count is not a very

Re: [R] Factor to continuous

2009-04-14 Thread Luc Villandre
Hi, You'll need to be more specific about the nature of your problem. Could you describe what exactly you're trying to do and why you need to transform factors into continuous variables? Could you also provide a small subsample of the data you're working with? Without such information, I

[R] subset dataframe by rows using character vector?

2009-04-14 Thread zack holden
Dear List, I'm stuck on what seems like a simple indexing problem, I'd be very grateful to anyone willing to help me out. I queried a dataframe which returns a character vector called plot. I have another dataframe from which I want to subset or select only those rows that match plot.

Re: [R] Factor to continuous

2009-04-14 Thread Keith Jewell
I suspect the OP is looking for FAQ 7.10 http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numeric_003f HTH Keith J Luc Villandre villa...@dms.umontreal.ca wrote in message news:49e495fe.1090...@dms.umontreal.ca... Hi, You'll need to be more specific about the nature

Re: [R] fractal vs. Fractal packages

2009-04-14 Thread spencerg
Dear Erin: 'RSiteSearch.function(Fractal)' [using the RSiteSearch package available via 'install.packages(packagename,repos=http://R-Forge.R-project.org;)'] returned 61 hits, 41 for fractal, 6 for RandomFields, 4 for ProbForecastGOP, 3 each for fdim and FieldSim, 2 for adehabitat and 1

[R] Lattice xyplot with two y axis

2009-04-14 Thread taz9
Hi All, I have some data which needs to be plotted with lattice. library(lattice) cars - c(0.1, 0.3, 0.6, 0.4, 0.9) trucks - c(0.2, 0.5, 0.4, 0.5, 0.1) drivers-c(121,145,167,200, 210) year-c(2005,2006,2007,2008,2009) type-c(local,local,foreign,foreign,foreign) xyplot(cars+trucks~year|type,

[R] disappearing dialog boxes when using tcltk

2009-04-14 Thread Hua Li
Dear all, I'm trying to use tcltk to build a small user-interface and couter the problem: It seems that sometimes the dialog box will be minimized automatically though I want it to be on top of the screen all the time. For example, when runing the following code, if you type in a1, a2, a3,

Re: [R] cbind

2009-04-14 Thread Luc Villandre
Hi Emma, Here's what I suggest: na.vec = is.na(A[,1]) ; first.num.pos = min(which(na.vec==FALSE)) ; first.part = (-first.num.pos+1):(-1) ; second.part = 0:(length(A[,1])-length(first.part)-1) ; Result.mat = cbind(c(first.part,second.part),A[,1]) ; I hope this is what you

Re: [R] subset dataframe by rows using character vector?

2009-04-14 Thread baptiste auguie
Is this what you want? plotNames - c(plot1, plot2, plot3) # plot is probably best left as the name of the base function full.data[full.data$PLOTID %in% plotNames, ] # note the comma HTH, baptiste On 14 Apr 2009, at 15:20, zack holden wrote: Dear List, I'm stuck on what seems like

[R] Help with ANOVA p-values

2009-04-14 Thread Amit Patel
Hi I have done ANOVA on a dataset (See Below) but am having problems retreiving the p-value. I am assuming that Pr(F) is the p-value but cannot get this value or in fact any other value (e.g. DF) from the summary.Any suggestions?? I have tried sum-summary(zzz.aov) sum$Pr(F) Error: unexpected

Re: [R] subset dataframe by rows using character vector?

2009-04-14 Thread baptiste auguie
glad it was helpful. %in% is a logical operator, so you can use ! to negate the result (with parentheses), ! ( 4 %in% 1:3) Alternatively, define a new operator, `%ni%` - Negate(`%in%`) 1 %ni% c(2,1) Next time you ask a follow-up question please send it to the r-help list so others can

Re: [R] Help with ANOVA p-values

2009-04-14 Thread Usuario R
Hi, you can try something like: summary( zzz.aov )[[1]][ Pr(F) ] Regards 2009/4/14 Amit Patel amitrh...@yahoo.co.uk Hi I have done ANOVA on a dataset (See Below) but am having problems retreiving the p-value. I am assuming that Pr(F) is the p-value but cannot get this value or in fact any

[R] Two functions plotted in wireframe

2009-04-14 Thread Alrik Thiem
Hi together, I have some graphical problems. I would like to add a semi-transparent surface at z=1 to an existing lattice wireframe plotting a general function z=f(x,y). Any suggestions on how this can be done? Thanks, Alrik [[alternative HTML version deleted]]

Re: [R] any other fast method for median calculation

2009-04-14 Thread Thomas Lumley
On Tue, 14 Apr 2009, S Ellison wrote: Sorting with an appropriate algorithm is nlog(n), so it's very hard to get the 'exact' median any faster. There actually are linear-time algorithms for the median, but n has to be very large before they are worth using, and by then you have to start

Re: [R] Jacobian

2009-04-14 Thread Ravi Varadhan
First, why do you want the jacobian? Assuming you have a good reason for wanting jacobian, Is this want you want to do? require(numDeriv) func2 - function(z) { x - z[1] y - z[2] c(sin(x*y), cos(x^2*y)) }    x - seq(0, 1, length=5) *2*pi    y - seq(0, 1,

[R] Legend: different family for title and labels

2009-04-14 Thread Marc Chiarini (Tufts)
Hello All, I am attempting to create a legend where the title has font family sans (or Helvetica in PS), and the labels (entries in the legend) have font family mono (or Courier). Would anyone be able to offer help on this? I have successfully changed the entire legend family to mono using

Re: [R] Building GUI for custom R application

2009-04-14 Thread Bert Gunter
Duncan Murdoch and Brian Ripley (I believe) have provided some limited but serviceable native Windows GUI functionality within R for Windows. See ?winMenuAdd, ?choose.files , ?select.list, ?getGraphicsEvent,?winProgressBar for examples and further links. Everything that you mention can be rather

Re: [R] Search for a graph package - see link

2009-04-14 Thread Knut Krueger
Gábor Csárdi schrieb: Hmmm, how should 'plot' know automatically what size/width you want? Sorry, I don't really know what you want to achieve here. If you want to calculate the width from some properties of the graph, then simply do that and assign it as the 'width' argument. Hi Gábor, the

Re: [R] Search for a graph package - see link

2009-04-14 Thread Gábor Csárdi
On Tue, Apr 14, 2009 at 6:07 PM, Knut Krueger r...@krueger-family.de wrote: Gábor Csárdi schrieb: Hmmm, how should 'plot' know automatically what size/width you want? Sorry, I don't really know what you want to achieve here. If you want to calculate the width from some properties of the

Re: [R] Lattice xyplot with two y axis

2009-04-14 Thread Richard . Cotton
I have some data which needs to be plotted with lattice. library(lattice) cars - c(0.1, 0.3, 0.6, 0.4, 0.9) trucks - c(0.2, 0.5, 0.4, 0.5, 0.1) drivers-c(121,145,167,200, 210) year-c(2005,2006,2007,2008,2009) type-c(local,local,foreign,foreign,foreign) xyplot(cars+trucks~year|type,

[R] Function call error in cph/survest (package Design)

2009-04-14 Thread Dieter Menne
Dear UseR, I do not know if this a problem with me, my data or cph/survest in package design. The example below works with a standard data set, but not with my data, but I cannot locate the problem. Note that I am using an older package of survival to avoid a problem with the newly renamed

Re: [R] Lattice xyplot with two y axis

2009-04-14 Thread Dieter Menne
taz9 alienz747 at gmail.com writes: I have some data which needs to be plotted with lattice. library(lattice) cars - c(0.1, 0.3, 0.6, 0.4, 0.9) trucks - c(0.2, 0.5, 0.4, 0.5, 0.1) drivers-c(121,145,167,200, 210) year-c(2005,2006,2007,2008,2009) type-c(local,local,foreign,foreign,foreign)

Re: [R] Lattice xyplot with two y axis

2009-04-14 Thread alienz747
Richie, this is perfect! Thank you so much. All the best, Kate On Tue, Apr 14, 2009 at 12:16 PM, richard.cot...@hsl.gov.uk wrote: I have some data which needs to be plotted with lattice. library(lattice) cars - c(0.1, 0.3, 0.6, 0.4, 0.9) trucks - c(0.2, 0.5, 0.4, 0.5, 0.1)

Re: [R] Search for a graph package - see link

2009-04-14 Thread Knut Krueger
Follow along these lines: http://lists.gnu.org/archive/html/igraph-help/2009-04/msg00104.html plus set the 'width' edge attribute to represent the number of actions. Thanks,Gabor this was my first solution, but unfortunately the data are very complicated to visualize. let me expand the

Re: [R] Search for a graph package - see link

2009-04-14 Thread Gábor Csárdi
On Tue, Apr 14, 2009 at 6:46 PM, Knut Krueger r...@krueger-family.de wrote: [...] In that case all lines would be thick and the actions Node 1 - 2  ,Node 3 - 1,Node 2 - 3   would be invisible, so I tried the narrow arrows to get above the thick arrows in an other colour, but I found no rule to

[R] Forcing the extrapolation of loess through the origin

2009-04-14 Thread jimm-panse
Hi all, I'm fitting a line to my dataset. Later I want to predict missing values that exceed the [min,max] interval of my empirical data, therefore I choose surface=direct for extrapolation. l1-loess(y1~x1,span=0.1,data.frame(x=x1,y=y1),control=loess.control(surface=direct)) In my application

Re: [R] Forcing the extrapolation of loess through the origin

2009-04-14 Thread Bert Gunter
Below. Bert Gunter Genentech Nonclinical Biostatistics 650-467-7374 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of jimm-pa...@gmx.de Sent: Tuesday, April 14, 2009 10:08 AM To: r-help@r-project.org Subject: [R] Forcing the

[R] Automating object creation

2009-04-14 Thread Zachary Patterson
I am new to R. I would like to automate the creation of a number of vectors but can't seem to get the string formatting to work. Here's what I would like to be able to do: Suppose we have a vector: x - c(2,4,5) I would like to be able to create a set of vectors whose names are associated with

Re: [R] Automating object creation

2009-04-14 Thread baptiste auguie
?assign (but are you sure you really want to name all these objects separately? Usually in R you would put them together in a list or a data.frame, it is much more convenient for later manipulations) On 14 Apr 2009, at 18:32, Zachary Patterson wrote: I am new to R. I would like to

Re: [R] Automating object creation

2009-04-14 Thread Barry Rowlingson
On Tue, Apr 14, 2009 at 6:32 PM, Zachary Patterson zak.patter...@gmail.com wrote: I am new to R. I would like to automate the creation of a number of vectors but can't seem to get the string formatting to work. Here's what I would like to be able to do: Suppose we have a vector: x -

Re: [R] Automating object creation

2009-04-14 Thread Stavros Macrakis
It is certainly possible to create x2, x4, etc. using something like assign( sprintf(x%d,i), ...value... ). But are you sure you need separate *variables* x2, x4, etc.? Why not create a list of vectors addressible as x[2] etc.? You can do that with x - list() (to define the data type of x as

Re: [R] Forcing the extrapolation of loess through the origin

2009-04-14 Thread Stavros Macrakis
On Tue, Apr 14, 2009 at 1:08 PM, jimm-pa...@gmx.de wrote: I'm fitting a line to my dataset. Later I want to predict missing values that exceed the [min,max] interval of my empirical data, therefore I choose surface=direct for extrapolation.

Re: [R] Forcing the extrapolation of loess through the origin

2009-04-14 Thread Julian Burgos
Hi Torsten, If you are fitting a line, why are you using loess? Why not simply use lm to fit a regression line that goes through the origin? (i.e. with no intercept). Julian jimm-pa...@gmx.de wrote: Hi all, I'm fitting a line to my dataset. Later I want to predict missing values that

Re: [R] Automating object creation

2009-04-14 Thread Zachary Patterson
Wow! I wasn't expecting such quick and helpful responses. I will see which of these suggestions works best for what I am doing. Thanks very much to all of you. Zak On Tue, Apr 14, 2009 at 1:58 PM, Stavros Macrakis macra...@alum.mit.edu wrote: It is certainly possible to create x2, x4, etc.

[R] Fitted values and MSE of individual fits in lmList

2009-04-14 Thread Marc
Dear useRs, I am working on a series of field experiments (159 in total) carried out in different years in several locations. The cultivars in each experiment are not always the same, in fact they change over time. I would like to get the fitted values and MSE of the individual fits from the

Re: [R] Physical Units in Calculations

2009-04-14 Thread Patrick Connolly
On Mon, 13-Apr-2009 at 09:15PM +0100, S Ellison wrote: | bill.venab...@csiro.au 04/13/09 4:01 AM | The UK uses metres for most lengths but miles for road distances - | the worst of all worlds. They even measure fuel performance in | litres per 100 *miles*, if you can believe it. | No, we

[R] matrix merge problem

2009-04-14 Thread Juan Pablo Fededa
Dear r-help contributors, I have two questions: first: I have a matrix A and a vector B. I want to make a new matrix C, which is made of the rows of A having a value included in B. Second: I have two matrixes A and B, of different dimensions. B has unique values in column 2 and A has not

Re: [R] Building GUI for custom R application

2009-04-14 Thread mah
If the desired end-state is a regression model and the appropriate diagnostics, the Rcmdr package contains the necessary tools. Rcmdr is available for many Linux distribuitons as well as for Windows, and it is able to do much more than import-and-regress. I think the package was built from

[R] method ML

2009-04-14 Thread joewest
Hi I am doing lme models and they are coming out using the REML method, can anyone please tell me how i use the ML method and exactly what i put in to R to do this? Just wanted to say thanks for everyone who helped with my last question. Thanks Joe -- View this message in context:

[R] scatterplot3d

2009-04-14 Thread Eric Erickson
Dear R-help, I am having trouble with your scatterplot3d program. For help with this problem I was directed to your address by Martin Maechler at r-core-boun...@r-project.org. I'm also sending a CC to r-core-ow...@r-project.org as I'm not yet certain of the proper address to use for this. I

[R] import from stata

2009-04-14 Thread Dwayne Blind
Dear R users, I am trying to import a table from STATA, a dta file. With a table called table, this is what I do : library(foreign) read.dta(table) It does not work. What am I doing wrong ? Best Regards, Dwayne [[alternative HTML version deleted]]

Re: [R] method ML

2009-04-14 Thread Luc Villandre
Hi Joe, You're using the lme() function? If so, then adding /method = ML / to the argument list should do the trick. Cheers, Luc joewest wrote: Hi I am doing lme models and they are coming out using the REML method, can anyone please tell me how i use the ML method and exactly what i put

Re: [R] Random Forests Variable Importance Question

2009-04-14 Thread Dimitri Liakhovitski
Paul, To build on what Andy said: The measures of importance RF provides are just alternative ways of getting at the same thing: Variable Importance. For example, MeanDecreaseAccuracy is one of those alternatives. As Andy said, it does not make sense to look at the absolute importance value. In a

Re: [R] matrix merge problem

2009-04-14 Thread Luc Villandre
Hi again, Your second problem can be solved with the merge function. Look at the help file with ?merge. Best of luck, Luc Juan Pablo Fededa wrote: Merci a lot!! On Tue, Apr 14, 2009 at 10:32 PM, Luc Villandre villa...@dms.umontreal.ca mailto:villa...@dms.umontreal.ca wrote: Hi

Re: [R] Question on zero-inflated Poisson count data with repeatedmeasures design - glmm.ADMB

2009-04-14 Thread Strubbe Diederik
Dear Thierry, Thanks for your answer and for letting me know about the R-Sig-mixed models mailing list! Furthermore you assume that the first visit in year 1 has the same effect as the first visit in year 2 and 3. And the same goes for the other visits. Is that a valid assumption for your

Re: [R] matrix merge problem

2009-04-14 Thread Luc Villandre
Hi Juan, Your first question can be answered easily. bin.matrix = matrix(A %in% B,nrow(A),ncol(A)) ; bin.vector = rowSums(bin.matrix) 0 ; C = A[bin.vector,] ; This should do the trick. Cheers, Luc Juan Pablo Fededa wrote: Dear r-help contributors, I have two questions: first: I have a

Re: [R] Building GUI for custom R application

2009-04-14 Thread Liviu Andronic
On Tue, Apr 14, 2009 at 9:46 PM, mah harwood...@gmail.com wrote: If the desired end-state is a regression model and the appropriate diagnostics, the Rcmdr package contains the necessary tools.  Rcmdr is available for many Linux distribuitons as well as for Windows, and it is able to do much

[R] Help with nested loops

2009-04-14 Thread tsippel
Hello- I need to loop through a directory of files to extract data corresponding to dates in a dataframe. Within a function, I've written nested loops to index the dataframe dates, and the directory files. My function successfully extracts the data corresponding to my first data frame date, but

Re: [R] Two functions plotted in wireframe

2009-04-14 Thread Duncan Murdoch
On 14/04/2009 11:18 AM, Alrik Thiem wrote: Hi together, I have some graphical problems. I would like to add a semi-transparent surface at z=1 to an existing lattice wireframe plotting a general function z=f(x,y). Any suggestions on how this can be done? Transparency is hard, and I don't

[R] Controlling widths in write.fwf()

2009-04-14 Thread Vemuri, Aparna
Is there a way to handle the widths of values being written to a file using wrtite.fwf() ? For example, I used read.fwf(file, width.vector) to read a file. After making the necessary data manipulation, I want to write the data to a new file in the same width.vector format. Is there a way to

Re: [R] Controlling widths in write.fwf()

2009-04-14 Thread Duncan Murdoch
On 14/04/2009 7:28 PM, Vemuri, Aparna wrote: Is there a way to handle the widths of values being written to a file using wrtite.fwf() ? For example, I used read.fwf(file, width.vector) to read a file. After making the necessary data manipulation, I want to write the data to a new file in the

[R] Lattice xyplot: Line and Rectangle in legend.

2009-04-14 Thread jimdare
Hello fellow R users, I have a problem. I have created a barchart overlayed by an xyplot line, both of which read off the same Y axis. The problem comes when I try to generate a key. It seems that I can only create either two lines, or two rectangles. I would much prefer to have the barchat

Re: [R] Darker markers for symbols in lattice

2009-04-14 Thread Deepayan Sarkar
On Mon, Apr 13, 2009 at 9:37 AM, Naomi B. Robbins nbrgra...@optonline.net wrote: Now that I have the markers the weight I want using lex, I'm having trouble making the key match the markers. Any suggestions? BTW, I'm using R2.8.1 with Windows Vista. There's no real solution, but for some

Re: [R] Lattice xyplot: Line and Rectangle in legend.

2009-04-14 Thread Deepayan Sarkar
On Tue, Apr 14, 2009 at 4:39 PM, jimdare jamesdar...@gmail.com wrote: Hello fellow R users, I have a problem.  I have created a barchart overlayed by an xyplot line, both of which read off the same Y axis.  The problem comes when I try to generate a key.  It seems that I can only create

[R] large version of the R symbol

2009-04-14 Thread Martin Batholdy
hi, I would like to implement the R-symbol in a presentation. Is there a large-scaled version of it on the web? thanks for any help! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Controlling widths in write.fwf()

2009-04-14 Thread Brendan Morse
Hi Aparna, you could always use the write.table function and set sep=. This will put all of your data into a sort of fixed-width column depending on what you specify to separate the values. See basic example below: x-matrix(nrow=2, ncol=2, c(1,2,3,4)) write.table(x,

Re: [R] large version of the R symbol

2009-04-14 Thread Duncan Murdoch
On 14/04/2009 8:22 PM, Martin Batholdy wrote: hi, I would like to implement the R-symbol in a presentation. Is there a large-scaled version of it on the web? The developer.r-project.org web page has several versions of it. (The link is near the bottom of the main page.) Duncan Murdoch

Re: [R] Problem with bargraph.CI in Sciplot package

2009-04-14 Thread Manuel Morales
On Sat, 2009-04-11 at 08:10 -0400, Manuel Morales wrote: On Fri, 2009-04-10 at 15:07 -0700, Metconnection wrote: Hi there, I wonder if anyone can help me. I'm trying to use bargraph.CI in the Sciplot package when there is a missing combination of the factor levels. Unfortunately the

Re: [R] Controlling widths in write.fwf()

2009-04-14 Thread Vemuri, Aparna
Thanks Brendan. write.table() doesn't seem to do it for me. The problem is that my data is not formatted as well as you show in the example. There are numbers and strings of varying sizes and write.table() misses the format. Aparna -Original Message- From: Brendan Morse

Re: [R] import from stata

2009-04-14 Thread Stas Kolenikov
You need a full name in quotes: auto - read.dta(C:/Stata10/ado/base/a/auto.dta) works just fine on my computer. On 4/14/09, Dwayne Blind dwaynebl...@gmail.com wrote: Dear R users, I am trying to import a table from STATA, a dta file. With a table called table, this is what I do :

[R] confusion over names of lm.influence()$hat

2009-04-14 Thread Aaron M. Swoboda
I am performing a locally weighted regression model using housing data, where I only include observations within a certain distance of the house in question. For cross-validation of the bandwidth I am collecting elements of the hat matrix (where y hat=hat matrix *y). I was convinced I

[R] Compiling Fortran Subroutines as R Shared Objects on Mac OS-X

2009-04-14 Thread Chad R. Bhatti
Hello, I am trying to compile some F77 subroutines as shared objects for R on my Mac. -- Mac OS-X Version 10.4.11 (Tiger Intel Mac) I have done this (successfully) before on Sun Solaris and Linux Fedora systems using the following command. R CMD SHLIB myfile.f I have g77 installed from this

[R] Rpad vs. Rapache

2009-04-14 Thread Vince Fulco
Dear R-experts- I'm attempting to evaluate Rpad and Rapache with the former already installed. When I run the latter using VMware, it tries to run on the default IP address assigned to Rpad. Not being facile in Apache, I am considering running both in parallel for a time and my question is do

[R] How to use cubic spline coefficients from termstrc package?

2009-04-14 Thread Chirantan Kundu
Hi, I'm using the cubic splines from termstrc package. I invoked the splines_estim function with a group of 43 bonds. It computes 6 knot points and returns values for alpha1 to alpha7. My question is how to use these alpha1 to alpha7 in the equation of yield? For example, if I'm trying to find

[R] savePlot error when type = eps or wmf

2009-04-14 Thread jimdare
Hello, When I use savePlot(filename=xy,type=eps) or savePlot(filename=xy,type=wmf) , I get the following error: Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : Polygon edge not found (zero-width or zero-height?) This doesn't occur when I change the type to jpeg or

[R] Creating a graphics window (in Windows, with RGui) that is not constrained to the RGui Window

2009-04-14 Thread Joseph Voelkel
Hi, all, Using RGui, is it possible to create a graphics window that can be moved outside of the RGui window? (This can be done--in fact must be done--using Rterm, but I wish to use RGui.) My interest for this is to use two monitors: in my private monitor I wish to execute R code in the Rgui

Re: [R] Group by in R

2009-04-14 Thread Paul Johnson
On Mon, Apr 13, 2009 at 8:56 AM, Nick Angelou nikola...@yahoo.com wrote: data   X1 X2 X3 X4 1   1  2  2  1 2   1  1  2  2 3   1  1  2  2 4   2  2  1  2 5   1  1  2  2 6   2  2  1  2 7   1  1  2  1 8   2  2  1  2 9   1  2  1  1 10  1  1  2  2 sqldf(select X1, X2, X3, X4, count(*) CNT

[R] excluding a column from a data frame

2009-04-14 Thread Erin Hodgess
Dear R People: Suppose I have the following data frame: x1 x2 x3 1 -0.1582116 0.06635783 1.765448 2 -1.1407422 0.47235664 0.615931 3 0.8702362 2.32301341 2.653805 str(xx) 'data.frame': 3 obs. of 3 variables: $ x1: num -0.158 -1.141 0.87 $ x2: num 0.0664 0.4724

Re: [R] excluding a column from a data frame

2009-04-14 Thread Peter Alspach
Tena koe Erin xx[, names(xx)!='x2'] HTH Peter Alspach -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Erin Hodgess Sent: Wednesday, 15 April 2009 5:39 p.m. To: R help Subject: [R] excluding a column from a data frame

Re: [R] excluding a column from a data frame

2009-04-14 Thread Coen van Hasselt
Alternatively you could also drop the column like this: xx$x2-NULL On Wed, Apr 15, 2009 at 15:51, Peter Alspach palsp...@hortresearch.co.nz wrote: Tena koe Erin xx[, names(xx)!='x2'] HTH Peter Alspach -Original Message- From: r-help-boun...@r-project.org

  1   2   >