[R] Odp: Basic doubt on ylim

2010-04-20 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 20.04.2010 21:21:26: > > Hi all, > > I'm a newbie with R and with a very basic question. > Can I define the minor unit for ylim? For example, I have a y scale ranging > from 1 to 14, jumping automatically every 2 units, but I want it to jump 1 > unit

Re: [R] Converting daily data series to monthly series

2010-04-20 Thread zow...@ncst.go.ke
Thanks Gabor, I have got the idear how to aggregate the daily data into monthly data using the zoo package. However, as I indicated earlier, in the series I am analysing, 29th February of leap years are excluded (so as to have 365 days in each year). How do I coerce(force) the the aggregate com

Re: [R] Converting daily data series to monthly series

2010-04-20 Thread Rubén Roa
> -Mensaje original- > De: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] En nombre de zow...@ncst.go.ke > Enviado el: miércoles, 21 de abril de 2010 5:16 > Para: r-help@r-project.org > Asunto: [R] Converting daily data series to monthly series > > Hi Users, > I hav

Re: [R] Converting daily data series to monthly series

2010-04-20 Thread Gabor Grothendieck
There is a monthly aggregation of daily data example in the zoo-quickref vignette: vignette("zoo-quickref") and there are also relevant examples using aggregate.zoo or duplicated in the example section of ?aggregate.zoo On Tue, Apr 20, 2010 at 11:16 PM, zow...@ncst.go.ke wrote: > Hi Users, > I

Re: [R] 'cuts' option in levelplot()

2010-04-20 Thread Gurmeet
Thanks David! :P On Tue, Apr 20, 2010 at 11:02 PM, David Winsemius wrote: > > On Apr 20, 2010, at 10:43 PM, Gurmeet wrote: > > Hi All, >> >> Does anyone knows what exactly "cuts=some number" (say 15) does in >> lattice's >> levelplot(). I doubt this but does it uses cut() internally, something >>

[R] Converting daily data series to monthly series

2010-04-20 Thread zow...@ncst.go.ke
Hi Users, I have daily series of data from 1962 - 2000, with the data for February 29th in leap years excluded, leaving 365 daily values for each year. I wish to convert the daily series to monthly series. How can I do this using the zoo package or any other package? Thanks ZABLONE OWITI G

Re: [R] 'cuts' option in levelplot()

2010-04-20 Thread David Winsemius
On Apr 20, 2010, at 10:43 PM, Gurmeet wrote: Hi All, Does anyone knows what exactly "cuts=some number" (say 15) does in lattice's levelplot(). I doubt this but does it uses cut() internally, something like cut(z, 15)? C'mon, man, look at the code: seq(zrng[1], zrng[2], length.out = cu

[R] 'cuts' option in levelplot()

2010-04-20 Thread Gurmeet
Hi All, Does anyone knows what exactly "cuts=some number" (say 15) does in lattice's levelplot(). I doubt this but does it uses cut() internally, something like cut(z, 15)? Thanks, Gurmeet [[alternative HTML version deleted]] __ R-help@r-proj

Re: [R] Changing the position of label title and rotating the title

2010-04-20 Thread David Winsemius
On Apr 20, 2010, at 5:41 PM, Ceylan Yozgatligil wrote: Dear all, I want to plot a simple xy-plot but I have some problems with the label titles. In my plot, y-axis title should be at the top of the y-axis and it should be perpendicular to the axis. Similarly, x-axis title should be just

Re: [R] Results from clogit out of range?

2010-04-20 Thread David Winsemius
On Apr 20, 2010, at 7:31 PM, Noah Silverman wrote: I just read the help page for predict.coxph. It indicates that the risk score is just exp(lp) What I'm trying to find, and have seen with some other implementations is the "conditional probability within group". Neither the lp or the risk op

[R] ggplot and scale_x_date

2010-04-20 Thread Liam Blanckenberg
Hi all, I have a question about setting arbitrary breaks/labels when using GGPLOT and date/time data on the x-axis. I want to specify the breaks/limits arbitrarily rather than using scale_x_date(major = 'blah'), much like when arbitrarily defining breaks/labels using scale_x_discrete(breaks = blah

[R] Best subset of models for glm.nb()

2010-04-20 Thread Tim Clark
Dear List, I am looking for a function that will find the best subset of negative binomial models. I have a large data set with 15 variables that I am interested in. I want an easy way to run all possible models and find a subset of the "best" models that I can then look at in more detail. I

[R] User inputs

2010-04-20 Thread chrisli1223
Hi everyone, I have been searching for answers for the following questions but I don't have much success. The following questions may actually be quite simple. Any help would be greatly appreciated. (1) I have written a script which requires user input. I am using the readline() command.However,

Re: [R] sum specific rows in a data frame

2010-04-20 Thread Matthew Dowle
Or try data.table 1.4 on r-forge, its grouping is faster than aggregate : agg datatable X100.012 0.008 X100 0.020 0.008 X1000 0.172 0.020 X1 1.164 0.144 X1e.05 9.397 1.180 install.packages("data.table", repos="http://R-Forge.R-project.org";) require(data.t

Re: [R] Words appear to be bolded in the PDF output

2010-04-20 Thread chrisli1223
Problem solved. Yes, I found that the text is overlaid several times! Thank you very much for your help, greatly appreciated. :) -- View this message in context: http://n4.nabble.com/Words-appear-to-be-bolded-in-the-PDF-output-tp2016971p2018219.html Sent from the R help mailing list archive at N

[R] Changing the position of label title and rotating the title

2010-04-20 Thread Ceylan Yozgatligil
Dear all, I want to plot a simple xy-plot but I have some problems with the label titles. In my plot, y-axis title should be at the top of the y-axis and it should be perpendicular to the axis. Similarly, x-axis title should be just next to the x-axis not at the bottom. By using mgp, I can change

Re: [R] Results from clogit out of range?

2010-04-20 Thread Noah Silverman
I just read the help page for predict.coxph. It indicates that the risk score is just exp(lp) What I'm trying to find, and have seen with some other implementations is the "conditional probability within group". Neither the lp or the risk options seem to deliver this. What am I missing? -N O

Re: [R] Results from clogit out of range?

2010-04-20 Thread Noah Silverman
Thanks David, That explains a lot. I appreciate it. -- Noah On 4/20/10 3:48 PM, David Winsemius wrote: > > On Apr 20, 2010, at 5:59 PM, Noah Silverman wrote: > >> Hi, >> >> I'm calculating a conditional logit on some data stratified by group. >> My understanding was that a conditional logit by

Re: [R] Using all variables in a linear model

2010-04-20 Thread Gabor Grothendieck
lm can take a data frame whose first column is the response so: lm(rev(x)) On Tue, Apr 20, 2010 at 6:12 PM, Walter Yund IV wrote: > Hello, > > I am trying to automate linear regression for many different datasets, each > with the same rough format (the last variable is the response).  I've been

Re: [R] Results from clogit out of range?

2010-04-20 Thread David Winsemius
On Apr 20, 2010, at 5:59 PM, Noah Silverman wrote: Hi, I'm calculating a conditional logit on some data stratified by group. My understanding was that a conditional logit by definition returns a value between 0 and 1 a a probability. Can anyone suggest why I'm seeing results outside of the {0

Re: [R] "some problems"

2010-04-20 Thread Ted Harding
On 20-Apr-10 21:25:28, tamas barjak wrote: > Dear R community! > > I am a mathematician listener, and I have to rewrite some > source codes from Matlab to R. I would like to ask a solution > of people who are skilled at him better hereby, because it is > very new for me R and I do not receive it f

Re: [R] Using all variables in a linear model

2010-04-20 Thread Joshua Wiley
What about using x[,-predictor]. For instance: x <- matrix(1:9, nrow=3) x[,-2] # all but the second column Perhaps using your code it would be something like... lm=lm(x[,dim(x)[2]] ~ x[,-dim(x)[2]], data=x) Best regards, Josh On Tue, Apr 20, 2010 at 3:12 PM, Walter Yund IV wrote: > Hello, >

[R] Using all variables in a linear model

2010-04-20 Thread Walter Yund IV
Hello, I am trying to automate linear regression for many different datasets, each with the same rough format (the last variable is the response). I've been doing something like this: lm=lm(x[,dim(x)[2]] ~ ., data=x) where the dot denotes all variables. However, this means that the response

[R] Results from clogit out of range?

2010-04-20 Thread Noah Silverman
Hi, I'm calculating a conditional logit on some data stratified by group. My understanding was that a conditional logit by definition returns a value between 0 and 1 a a probability. Can anyone suggest why I'm seeing results outside of the {0,1} range?? The call in R is: m <- clogit(score ~ va

[R] "some problems"

2010-04-20 Thread tamas barjak
Dear R community! I am a mathematician listener, and I have to rewrite some source codes from Matlab to R. I would like to ask a solution of people who are skilled at him better hereby, because it is very new for me R and I do not receive it final result than in Matlab. So the problem: --- Let u

Re: [R] Basic doubt on ylim

2010-04-20 Thread David Winsemius
There's a worked example of using axis() at the bottom of ?plot.default On Apr 20, 2010, at 4:48 PM, Ivan Calandra wrote: Hi, Take a look at ?par and especially the xaxp argument. I'm not quite sure, but if it's not this one, it's probably another one in par() HTH, Ivan Le 20-Apr-10 21:21

Re: [R] Basic doubt on ylim

2010-04-20 Thread Ivan Calandra
Hi, Take a look at ?par and especially the xaxp argument. I'm not quite sure, but if it's not this one, it's probably another one in par() HTH, Ivan Le 20-Apr-10 21:21, poliveira a écrit : > Hi all, > > I'm a newbie with R and with a very basic question. > Can I define the minor unit for ylim?

Re: [R] Error in from:to : NA/NaN argument

2010-04-20 Thread Ivan Calandra
Hi, The problem, I think, comes from seq(peak_index,valley_index-1) Since I don't know what is peak_index and valley_index, it is difficult to further help you. Ivan Le 20-Apr-10 21:54, cobbler_squad a écrit : Hello R gurus, I am having difficulties running a chunk of code that I otherwise

Re: [R] Exporting PDF

2010-04-20 Thread Phil Spector
Since R provides the file.exists() function for exactly this purpose, I would recommend avoiding using shell scripts for such a simple task. file.exists() is a multiplatform solution to the problem. - Phil Spector

[R] Basic doubt on ylim

2010-04-20 Thread poliveira
Hi all, I'm a newbie with R and with a very basic question. Can I define the minor unit for ylim? For example, I have a y scale ranging from 1 to 14, jumping automatically every 2 units, but I want it to jump 1 unit at a time...is it possible? I tried something like >boxplot(bla[,1], xlim=c(1,15

Re: [R] Error in from:to : NA/NaN argument

2010-04-20 Thread David Winsemius
On Apr 20, 2010, at 3:54 PM, cobbler_squad wrote: Hello R gurus, I am having difficulties running a chunk of code that I otherwise thought was correct.. if (lower < max(length(IC_peaks),length(IC_valleys))) { + valley_index <- IC_valleys[lower+1] + for (i in seq(peak_index,valley_index-

[R] Error in from:to : NA/NaN argument

2010-04-20 Thread cobbler_squad
Hello R gurus, I am having difficulties running a chunk of code that I otherwise thought was correct.. > if (lower < max(length(IC_peaks),length(IC_valleys))) { + valley_index <- IC_valleys[lower+1] + for (i in seq(peak_index,valley_index-1)) { + IC_peaks_and_valleys <- c(IC_peaks_and_valleys, "

[R] 3D surface plot with wireframe or persp?

2010-04-20 Thread Jin
Hello Dear, I have a function, like z=f(x,y), and try a surface plot with this function. But, on the reference of "wireframe" requires data option, so I generated x and y, and computed z with them. But, still I have a problem to draw a surface plot. The code and errors are

[R] lattice code to plot columns over another variable

2010-04-20 Thread Rajarshi Guha
Hi, I've been struggling with a lattice visualiation. I have a data.frame with 4 columns. What I'd like to have is a set of 3 panels. Ecah panel will have the first column plotted against serial number and then will superimpose the relevant column. My non-lattice version is as follows: x <- data.f

Re: [R] having more than one plot in one figure

2010-04-20 Thread David Winsemius
On Apr 20, 2010, at 10:34 AM, kayj wrote: Hi All, I have been trying to plot multiple line plots with different colors on one figure. in my example below I was able to plot cat vs num1 as a dot plot connected with lines but was not able to do that for cat vs num2 and I do not know how

Re: [R] Building Rblas.dll failing on Windows 7 (64-bit)

2010-04-20 Thread Udaya B. Kogalur
I'm currently attempting to build R-2.10.1 from the source on Windows 7 (64-bit version). I've downloaded the latest Rtools (Rtools211.exe) from the Murdoch-Sutherland site and have done a full install. I've also downloaded the HTML Help Workshop, MikTeX, and the InnoSetup installer. I am not us

[R] having more than one plot in one figure

2010-04-20 Thread kayj
Hi All, I have been trying to plot multiple line plots with different colors on one figure. in my example below I was able to plot cat vs num1 as a dot plot connected with lines but was not able to do that for cat vs num2 and I do not know how to add the third plot cat vs num3. below is my code

Re: [R] Exporting PDF

2010-04-20 Thread Polwart Calum (County Durham and Darlington NHS Foundation Trust)
> I run the script and it exports a PDF called "version 1". > I want it to check if "version 1" already exists. If so, > then I want the new graphs to be exported as > "version 2", and so on. > > Is it possible to do it in R? Someone may know a way. However its certainly possible to execute a co

[R] Help with Partial dependence bar graph

2010-04-20 Thread Daudi Jjingo
Hello, I need to draw a partial dependence bar graph. My the my predictor vectors are continous and so is the response variable. Iam using the partialPlot function of the randomForest package. I get a line graph. How can I edit it to get a bar graph instead? (partialPlot(randomForest object ,dat

Re: [R] shift and pop equivalent in R

2010-04-20 Thread Xie Chao
Thanks Barry for the code sample, and Thanks Duncan for the clarification. Both replies help a lot! Best Regards, Xie Chao On Wed, Apr 21, 2010 at 2:50 AM, Barry Rowlingson wrote: > On Tue, Apr 20, 2010 at 7:03 PM, Xie Chao wrote: >> Dear All, >> >> I am wondering is there any shift (or pop o

Re: [R] shift and pop equivalent in R

2010-04-20 Thread Barry Rowlingson
On Tue, Apr 20, 2010 at 7:03 PM, Xie Chao wrote: > Dear All, > > I am wondering is there any shift (or pop or push or unshift) equivalent in R? > For example, > shift(x)   # should return x[1], and x becomes x[-1] > I seem to have implemented a FIFO stack in 2003: http://finzi.psych.upenn.edu/R

Re: [R] shift and pop equivalent in R

2010-04-20 Thread Duncan Murdoch
On 20/04/2010 2:03 PM, Xie Chao wrote: Dear All, I am wondering is there any shift (or pop or push or unshift) equivalent in R? For example, shift(x) # should return x[1], and x becomes x[-1] Not in base R. Generally speaking, functions with side effects are frowned upon. It is possibl

Re: [R] comparing attitudes of 2 groups / likert scales?

2010-04-20 Thread Peter Ehlers
On 2010-04-19 9:15, Dieter Menne wrote: David Winsemius wrote: If you are thinking of using that quote, you might want to check the spelling of his name. My memory is van Belle. Sorry, I thought I had corrected that before mailing. @BOOK{vanBelle2002, title = {Statistical rules of th

[R] shift and pop equivalent in R

2010-04-20 Thread Xie Chao
Dear All, I am wondering is there any shift (or pop or push or unshift) equivalent in R? For example, shift(x) # should return x[1], and x becomes x[-1] Thanks a lot. Best Regards, Xie Chao __ R-help@r-project.org mailing list https://stat.ethz.ch/m

Re: [R] Unwanted boxes in legend

2010-04-20 Thread Peter Ehlers
On 2010-04-19 8:11, Thomas Stewart wrote: Try border=c(0,0,1,0). -tgs If the 'border' argument is not recognized, then this won't work. Steve: What version of R are you using? I have no problems with the suggestions I gave you in R 2.10.1 or R 2.11.0 alpha. -Peter Ehlers On Mon, Apr 19, 2

Re: [R] What is mclust up to? Different clusters found if x and y interchanged

2010-04-20 Thread Bryan Hanson
Thanks Prof. Fraley. This is very helpful. I had looked at the way mclust gets its start and that looked like a possible source of the differences, but had not had time to get up to speed and figure it out. I was thinking it was more of a set.seed sort of thing. Now I know more. Thanks so much

Re: [R] sum() returns 0 not NA

2010-04-20 Thread Ted Harding
On 20-Apr-10 17:07:31, Joshua Wiley wrote: > As a disclaimer, I cannot say that this is why sum() was designed as it > was. > > 0 is the sum of a set with no elements, the empty set {}. When > na.rm=TRUE, NA values are removed. When the only values are NA (as in > your example c(NA, NA) ), and y

Re: [R] sum() returns 0 not NA

2010-04-20 Thread Joshua Wiley
As a disclaimer, I cannot say that this is why sum() was designed as it was. 0 is the sum of a set with no elements, the empty set {}. When na.rm=TRUE, NA values are removed. When the only values are NA (as in your example c(NA, NA) ), and you remove them all, you are taking the sum of no elemen

Re: [R] Huge data sets and RAM problems

2010-04-20 Thread Jay Emerson
Stella, A few brief words of advice: 1. Work through your code a line at a time, making sure that each is what you would expect. I think some of your later problems are a result of something early not being as expected. For example, if the read.delim() is in fact not giving you what you expect,

Re: [R] QCA3 segfault

2010-04-20 Thread R Gott
this should have gone to the package manager apologies to all rg ded0rg wrote: Hi I have just dwonloaded QCA3 onto this machine (ubuntu, karmic, amd64) and a mac. The examples run fine on teh mac, but crashed R on ubuntu. Any help much apprecia\ted. Thanks Richard

Re: [R] sum() returns 0 not NA

2010-04-20 Thread Gabor Grothendieck
So that the two lines below give the same answer: xx <- c(); yy <- 1:3 sum(xx) + sum(yy) sum(c(xx, yy)) On Tue, Apr 20, 2010 at 12:42 PM, wrote: > Dear all, > > just a stupid R question, since the results puzzle me a bit: > >> sum(c(NA,NA), na.rm=TRUE) > [1] 0 >>  NA + NA > [1] NA >> NA + 1 >

[R] fit a line to power law distribution

2010-04-20 Thread Narges Zarabi
Hi, I am trying to fit a line in the log plot of my networks degree distribution to show that it is a power-law distribution. I am using the following commands. However, I am not able to see the fitted line. Any comments to help? I am using following packages: igraph, splines,base,VGAM, netmodels.

[R] sum() returns 0 not NA

2010-04-20 Thread will . eagle
Dear all, just a stupid R question, since the results puzzle me a bit: > sum(c(NA,NA), na.rm=TRUE) [1] 0 > NA + NA [1] NA > NA + 1 [1] NA > Why does sum(c(NA,NA), na.rm=TRUE) return 0 and not NA? Thanks in advance, Will __ R-help@r-project.org

[R] Visualize a fitted line in a log plot of a power law distribution

2010-04-20 Thread Narges Zarabi
Hi, I am trying to fit a line in the log plot of my networks degree distribution to show that it is a power-law distribution. I am using the following commands. However, I am not able to see the fitted line. Any comments to help? I am using following packages: igraph, splines,base,VGAM, netmodels.

[R] lattice visualization - superpose multiple columns over another (fixed) column

2010-04-20 Thread Rajarshi Guha
Hi, I've been struggling with a lattice visualiation. I have a data.frame with 4 columns. What I'd like to have is a set of 3 panels. Ecah panel will have the first column plotted against serial number and then will superimpose the relevant column. My non-lattice version is as follows: x <- data.f

Re: [R] QCA3 segfault

2010-04-20 Thread Ben Bolker
ded0rg finghall1.plus.com> writes: > I have just dwonloaded QCA3 onto this machine (ubuntu, karmic, amd64) and a > mac. The examples run fine on teh mac, but crashed R on ubuntu. Any help > much apprecia\ted. > You should probably contact the package maintainer (see help(package="QCA3")).

[R] [R-pkgs] cudaBayesreg update

2010-04-20 Thread Adelino
Dear all, Package cudaBayesreg, version 0.3-3, is now online. Apart some minor corrections, the package now includes a brief report of the tests used to assess the quality of the random number generator. Best regards, Adelino Ferreira da Silva

Re: [R] Weights in binomial glm

2010-04-20 Thread Jan van der Laan
Thomas, Thierry, Thank your for your answers and my appogies for my late reply. Thomas, from your reply it seems that dividing the weights by their average would also make finding a suitable starting value more robust. This indeed seems to be case from test I've ran. However, your comments about

[R] label the bars by the percentage values in the conditional histogram?

2010-04-20 Thread Changbin Du
HI, Dear R Community, Does anyone know how to label the values in the conditional histogram? Thanks so much!!! h<- sample(1:14, 319, rep=T) c<- sample(1:14, 608, rep=T) n<- sample(1:14, 1140, rep=T) vt<-c(h, c, n) ta<-rep(c("h", "c", "n"), c(319, 608, 1140)) to<-data.frame(vt,ta) library(lattic

Re: [R] stupid regexp question

2010-04-20 Thread servet ahmet çizmeli
Both methods solve my problem. Thanks a lot to Gabor and David! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

Re: [R] multiple plots problem

2010-04-20 Thread Kay Cichini
hi thomas, thanks a lot- of course that's it. i knew why the middle plot is stretcht, but didn't figure out that settting par(oma) is the key.. greetings, kay -- View this message in context: http://n4.nabble.com/multiple-plots-problem-tp2017326p2017551.html Sent from the R help mailing list

Re: [R] Exporting an rgl graph

2010-04-20 Thread Duncan Murdoch
On 20/04/2010 10:43 AM, l...@stat.uiowa.edu wrote: On Fri, 16 Apr 2010, Michael Friendly wrote: > l...@stat.uiowa.edu wrote: >> The current issue of JCGS (Vol 18 No 1, >> http://pubs.amstat.org/toc/jcgs/19/1) has an editorial on including >> animations, 3D visualizations, and movies in on-line P

[R] QCA3 segfault

2010-04-20 Thread ded0rg
Hi I have just dwonloaded QCA3 onto this machine (ubuntu, karmic, amd64) and a mac. The examples run fine on teh mac, but crashed R on ubuntu. Any help much apprecia\ted. Thanks Richard -- Terminal log: >conditi

Re: [R] Exporting an rgl graph

2010-04-20 Thread luke
On Fri, 16 Apr 2010, Michael Friendly wrote: l...@stat.uiowa.edu wrote: The current issue of JCGS (Vol 18 No 1, http://pubs.amstat.org/toc/jcgs/19/1) has an editorial on including animations, 3D visualizations, and movies in on-line PDF files supporting JCGS articles. The online supplements to

Re: [R] Drawing a line with misc3d

2010-04-20 Thread luke
misc3d only knows about triangular mesh scenes. For our JSS paper we added pointsTetrahedra that represents data points as small terahedra. You could do something analogous by creating a triangular mesh representation of a long thin bar for your lines. luke On Mon, 19 Apr 2010, Christophe Genoli

Re: [R] the bar width of barchart plot in lattice package

2010-04-20 Thread David Winsemius
On Apr 20, 2010, at 9:46 AM, zhenjiang xu wrote: Dear R users, I am trying to use the following code to make a barchar plot. The bars in the plot turn out to be a little narrow. Is there any way to modify the width of the bars? Thank you! library(lattice) scores = gl(2, 5, label=c('Sensi

Re: [R] log-linear regression question

2010-04-20 Thread Thomas Stewart
I think you'll need the offset option. ln( Y ) = ln( K ) + b1 ln( X1 ) + b2 ln( X2 / X3 ) + 1 ln( 1 / X3 ) as in: glm( log(Y) ~ log( X1 ) + I(log( X2 / X3 )), offset=I(log( 1 / X3 ))) -tgs On Tue, Apr 20, 2010 at 7:14 AM, rajiv guha wrote: > I am trying to estimate a demand function: >

Re: [R] problem with retreaving column from a data.frame

2010-04-20 Thread David Winsemius
On Apr 20, 2010, at 7:32 AM, venkata kirankumar wrote: Hi all, I have a problem with retreaving column from a data.frame that is I have a data.frame named "temp" in that dataframe some column are there whose names are "IDENTIFIER""UNIQUEID" "TRIALGROUPSID" "GRPNUMBER" "GRPDESC"

Re: [R] multiple plots problem

2010-04-20 Thread Thomas Stewart
The stretching of plot two occurs because you are allotting more space for plot two. You set Plot 1: mar=c(0,4,4,2) Plot 2: mar=c(0,4,0,2) Plot 3: mar=c(4,4,0,2) In plot one your are dedicating 4 lines to the top margin, in plot three you are dedicating 4 lines to the bottom margin. In plot two,

[R] the bar width of barchart plot in lattice package

2010-04-20 Thread zhenjiang xu
Dear R users, I am trying to use the following code to make a barchar plot. The bars in the plot turn out to be a little narrow. Is there any way to modify the width of the bars? Thank you! library(lattice) scores = gl(2, 5, label=c('Sensitivity', 'PPV'), length = 100) sequences = gl(5, 1, label=

Re: [R] problem with retreaving column from a data.frame

2010-04-20 Thread Thomas Stewart
Maybe you want something like this. temp<-data.frame(id=rbinom(10,5,.5),grp=rbinom(10,3,.3),stdid=rnorm(10)) kk<-"stdid" temp[,kk] -tgs On Tue, Apr 20, 2010 at 7:32 AM, venkata kirankumar wrote: > Hi all, > I have a problem with retreaving column from a data.frame that is > > I have a data.fra

Re: [R] Help: coxph() in {survival} package

2010-04-20 Thread Terry Therneau
The best answer to your question is help(coxph.object) This is a manual page describing the contents of a coxph fit. Terry Therneau __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide htt

Re: [R] log-linear regression question

2010-04-20 Thread Sayantani Basu Roy
open up the brackets (-1-b1) and you would get an equation in which you would have to estimate only b1 and b2... then you can proceed by the normal method.. On Tue, Apr 20, 2010 at 4:44 PM, rajiv guha wrote: > I am trying to estimate a demand function: > Y=K * X1^b1 * X2^b2 * X3 ^(-1-b1) > > in

Re: [R] how to draw multiple vertical bands

2010-04-20 Thread Petr PIKAL
Hi you can also use abline function x<-rnorm(10) plot(1:10, x) abline(v=seq(2,10,2), lwd=50, col="lightblue") lines(1:10, x, type="b") Regards Petr r-help-boun...@r-project.org napsal dne 19.04.2010 20:59:15: > On 04/15/2010 12:36 AM, senne wrote: > > > > hi R gurus > > > > > > I saw some g

Re: [R] multiple variables pointing to single dataframe?

2010-04-20 Thread Alex Bryant
That's great, that will work perfectly.. Thanks All! -Alex -Original Message- From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] Sent: Monday, April 19, 2010 10:34 AM To: Alex Bryant Cc: r-help@r-project.org Subject: Re: [R] multiple variables pointing to single dataframe? If yo

Re: [R] How to set proxy settings for R

2010-04-20 Thread Pete B
Hi Alessandra Did you restart R? You should be able to download packages using the Packages> Install Package(s) ... from the menu bar in the GUI. Once the package has been downloaded select Packages> Load Package ... you should see what you just downloaded in a list of available packa

[R] multiple plots problem

2010-04-20 Thread Kay Cichini
hello, i try to plot 3 graphs which have the same x.axis underneath each other. i'd like the plots to be aligned without margings between the boxes and draw a single x axis beneath the lowest plot. i managed to get the alignment by setting par(mar), but the middle box is stretched and i cant't

[R] Effective distance measures for Text Clustering

2010-04-20 Thread Harsh
Hi useRs, Disclaimer: My question is more statistical than pertaining specifically to the R system) I am using the "tm" package in R to create a Document-Term Matrix, with Tf-Idf measures. A) Once done, I create a distance matrix using "euclidean" distance measure. B) After this, I use hierarchica

[R] log-linear regression question

2010-04-20 Thread rajiv guha
I am trying to estimate a demand function: Y=K * X1^b1 * X2^b2 * X3 ^(-1-b1) in log form: ln Y = ln K + b1 ln X1 + b2 ln X2 + (-1-b1) ln X3 As the regression coefficients are related for 2 of the regressors, I am not sure of the appropriate methodology or function in R to handle this. Any hints?

Re: [R] how to draw multiple vertical bands

2010-04-20 Thread Marsh Feldman
On 04/15/2010 12:36 AM, senne wrote: > hi R gurus > > I saw some graphs with vertical band like this one: > > http://pragcap.com/wp-content/uploads/2010/04/GS.png > > how to draw the blue band in R, can't find any clue to do this,any ideas? See the source code for nber.xy and nberShade

Re: [R] How to set proxy settings for R

2010-04-20 Thread danda
Dear Pete, Thanks, it works now! I did as you suggested: --internet flag to the target line (right click, properties) e.g. "C:\Program Files\R\R-2.8.1\bin\Rgui.exe" --internet2 Strangely enough, I can now easly download packages but I still get these messages: chooseCRANmirror() Warning me

[R] problem with retreaving column from a data.frame

2010-04-20 Thread venkata kirankumar
Hi all, I have a problem with retreaving column from a data.frame that is I have a data.frame named "temp" in that dataframe some column are there whose names are "IDENTIFIER""UNIQUEID" "TRIALGROUPSID" "GRPNUMBER" "GRPDESC" "SEXDID""STDID" "STUDYTYPE" "SDID"

Re: [R] Words appear to be bolded in the PDF output

2010-04-20 Thread baptiste auguie
Hi, Taking a wild guess, it looks to me that you might have overlaid several times the same text, plot.new() text(0.5,0.5,rep("test",10)) HTH, baptiste On 20 April 2010 08:54, chrisli1223 wrote: > > Hi all, > > I have written a note near each of my graphs using mtext. > mtext(text,side=1,line

Re: [R] Words appear to be bolded in the PDF output

2010-04-20 Thread Patrick Connolly
On Mon, 19-Apr-2010 at 10:54PM -0800, chrisli1223 wrote: |> |> Hi all, |> |> I have written a note near each of my graphs using mtext. |> mtext(text,side=1,line=4,cex=0.5,adj=0) |> |> Then I have exported the graphs as a PDF file. |> pdf(file=name,paper='a4',width=7.27,height=10.69) That seems

Re: [R] local and global variables

2010-04-20 Thread Duncan Murdoch
On 20/04/2010 4:27 AM, n.via...@libero.it wrote: Hi all, I have a question about global and local variables.First of all, a variable defined in a for loop is it a local or global variable?? R doesn't create a local scope for "for" loops. So it will have the same scope as other variables c

Re: [R] apropos and find

2010-04-20 Thread Gavin Simpson
On Tue, 2010-04-20 at 10:24 +0200, Karsten Rincke wrote: > Hello, > I'm starting working myself in the use of R, reading M. J. Crawley, The > R Book. The problem I do encounter is concerning the commands apropos > and find: > > > apropos(edit) > Fehler: is.character(what) is not TRUE > > find(edit

Re: [R] how to select the last non-'NA' observation in a row

2010-04-20 Thread Dimitris Rizopoulos
one way is the following: a1 <- c(9,8,rep(NA,5)) a2 <- c(3,NA,3,NA,3,NA,4) a3 <- c(11,6,7,NA,5,NA,6) M <- rbind(a1,a2,a3) ind <- !is.na(M) tapply(M[ind], row(M)[ind], tail, 1) I hope it helps. Best, Dimitris On 4/20/2010 10:33 AM, gallon li wrote: I have a matrix of the following form:

Re: [R] apropos and find

2010-04-20 Thread Christian Raschke
?apropos says that it expects a character string. Therefore use quotes: > apropos("edit") > [1] "edit" "file.edit" "xedit" Christian On Tue, 2010-04-20 at 10:24 +0200, Karsten Rincke wrote: > Hello, > I'm starting working myself in the use of R, reading M. J. Crawley, The > R Book. The

[R] how to select the last non-'NA' observation in a row

2010-04-20 Thread gallon li
I have a matrix of the following form: time id0 2 4 6 9 12 14 3 9 8 NA NA NA NA NA 7 3 NA 3 NA 3 NA 4 13 11 6 7 NA 5 NA 6 . I hope for each row to select the last observation which is not 'NA'. For example, for the first row, id=3, the value I want to select is

[R] local and global variables

2010-04-20 Thread n.via...@libero.it
Hi all, I have a question about global and local variables.First of all, a variable defined in a for loop is it a local or global variable?? Second, I'm trying to build a loop in the following way: I have these 3 data frames bilanci_2005<-bilanci1[ANNO==2005,] bilanci_2006<-bilanci1[ANNO==2006,] b

[R] apropos and find

2010-04-20 Thread Karsten Rincke
Hello, I'm starting working myself in the use of R, reading M. J. Crawley, The R Book. The problem I do encounter is concerning the commands apropos and find: > apropos(edit) Fehler: is.character(what) is not TRUE > find(edit) Fehler: is.character(what) is not TRUE I get the same error message ty

Re: [R] glmer with non integer weights

2010-04-20 Thread Kay Cichini
hello, it's the Morisita Horn Index, which is an ecological index for similarity between two multivariate objects (vegetation samples with species and its abundance) where a value of one indicates completely same relative importance of species in both samples and 0 denotes total absence of any sa

Re: [R] Exporting an rgl graph

2010-04-20 Thread Christophe Genolini
Thanks a lot Both Asymptote and MeshLab work fine. Thanks for this article, Luke. On my particular case, I need to export lines (1D object in a 3D space) and not surfaces (2D objects). Is it possible to draw lines with misc3d ? Christophe Genolini Luke Tierney a écrit : The current issue o