[R] Analyzing event times with densityplot

2010-02-16 Thread David Lindelöf
Dear useRs, I have a file with a sequence of event timestamps, for instance the times at which someone visits a website: 02.02.2010 09:00:00 02.02.2010 09:00:00 02.02.2010 09:00:00 02.02.2010 09:00:01 02.02.2010 09:00:03 02.02.2010 09:00:05 02.02.2010 09:00:06 02.02.2010 09:00:06 02.02.2010

Re: [R] R on MAC OS X

2010-02-16 Thread Mestat
Hi listers, I just got a MAC, so I am trying to use the command READ.TABLE but I am getting a error that is probably caused by the wrong path that I am using... The command is the following... file-read.table(/Users/Márcio/UdeM/Travail Dirigé/Data/MU284 Population.txt,header=T,skip=24) And I am

Re: [R] READ.TABLE for Mac

2010-02-16 Thread Sharpie
Mestat wrote: Hi listers, I just got a MAC, so I am trying to use the command READ.TABLE but I am getting a error that is probably caused by the wrong path that I am using... The command is the following... file-read.table(/Users/Márcio/UdeM/Travail Dirigé/Data/MU284

Re: [R] odfTable: table width and alignment

2010-02-16 Thread Max Kuhn
Aleksey, Go ahead and send me a test file. Also: what version of OO are you using (or are you using something else)? Thanks, Max On Tue, Feb 16, 2010 at 3:40 PM, Aleksey Naumov anau...@gmail.com wrote: Max, Thank you for your help. Please see my responses below. On Tue, Feb 9, 2010 at

Re: [R] R on MAC OS X

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 2:23 PM, Mestat wrote: Hi listers, I just got a MAC, so I am trying to use the command READ.TABLE but I am getting a error that is probably caused by the wrong path that I am using... The command is the following... file-read.table(/Users/Márcio/UdeM/Travail

Re: [R] igraph

2010-02-16 Thread Paul Murrell
Hi gabrielap wrote: Hello... I am a system engeenering student and I am using R for first time for Graph Theory. I would like to know if there is anyway you can plot an ghaph (igraph library) and obtain a graph whose vertices dont appear identified with number, instead I would like the

Re: [R] Math.factor error message

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 2:25 PM, Hichem Ben Khedhiri wrote: Dear R-helpers, I am using a vrtest on time series data. My commands are as follows; read.table(B.txt,sep=\t,fill=TRUE, na.strings = NA) require(vrtest) rm(list=ls(all=TRUE)) datamat - read.table(B.txt,sep=\t,fill=TRUE, na.strings =

[R] Interactive plot (histogram) in R..........possible?

2010-02-16 Thread Megh
Dear all, I am looking for some kind of interactive plot to draw a histogram for a normal distribution with different sample size. In that plot there would be some sort of scroll-bar which will take min value 10 and maximum value of 10,000 as sample size (n) from a standard normal distribution.

Re: [R] Problems with boxplot in ggplot2:qplot

2010-02-16 Thread Brian Diggs
On 2/15/2010 2:41 PM, Dimitri Shvorob wrote: library(sqldf) library(ggplot2) t = data.frame(t = seq.Date(as.Date(2009-01-01), to = as.Date(2009-12-01), by = month)) x = data.frame(x = rnorm(5)) df = sqldf(select * from t, x) A simpler way to get random data that doesn't involve the sqldf

Re: [R] Math.factor error message

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 4:40 PM, David Winsemius wrote: On Feb 16, 2010, at 2:25 PM, Hichem Ben Khedhiri wrote: Dear R-helpers, I am using a vrtest on time series data. My commands are as follows; read.table(B.txt,sep=\t,fill=TRUE, na.strings = NA) require(vrtest) rm(list=ls(all=TRUE))

Re: [R] Interactive plot (histogram) in R..........possible?

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 4:44 PM, Megh wrote: Dear all, I am looking for some kind of interactive plot to draw a histogram for a normal distribution with different sample size. In that plot there would be some sort of scroll-bar which will take min value 10 and maximum value of 10,000 as

Re: [R] Problems with boxplot in ggplot2:qplot

2010-02-16 Thread Dimitri Shvorob
Now that we have a reproducible example... ;) -- View this message in context: http://n4.nabble.com/Problems-with-boxplot-in-ggplot2-qplot-tp1555338p1557994.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

[R] Problems building from sources

2010-02-16 Thread rkevinburton
I am trying to build R-2.9.2 from source on a Windows 7 machine. I have installed all of the requisite software and followed the instructions. I also could have sworn that I had a successful build. But now I get the following error. gcc -std=gnu99 -shared -s -mwindows -o R.dll R.def console.o

Re: [R] nls.lm AIC

2010-02-16 Thread Katharine Mullen
I will consider putting methods for AIC and logLik into the next version of minpack.lm (contributions welcome). For now, the following should work for logLik, where 'object' is the return value of nls.lm. logLik.nls.lm - function(object, REML = FALSE, ...) { res - object$fvec N -

Re: [R] RODBC missing values in integer columns

2010-02-16 Thread Rob Forler
It turns out that in the sqlQuery I must set rows_at_time =0 to get rid of this problem. Does anyone have any idea why this might be? On Tue, Feb 16, 2010 at 12:52 PM, Rob Forler rfor...@uchicago.edu wrote: some more info t(t(odbcGetInfo(connection))) [,1] DBMS_Name

[R] strangeness in Predict() {rms}

2010-02-16 Thread Dylan Beaudette
Hi, Running the following example from ?Predict() throws an error I have never seen before: set.seed(1) x1 - runif(300) x2 - runif(300) ddist - datadist(x1,x2); options(datadist='ddist') y - exp(x1+ x2 - 1 + rnorm(300)) f - ols(log(y) ~ pol(x1,2) + x2) p1 - Predict(f, x1=., conf.type='mean')

Re: [R] strangeness in Predict() {rms}

2010-02-16 Thread Bill.Venables
This works without a glitch on my linux system (info below). You might try upgrading your R to 2.10.1, perhaps. sessionInfo() R version 2.10.1 (2009-12-14) x86_64-unknown-linux-gnu locale: [1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_AU.UTF-8

Re: [R] Separating columns, and sorting by rows

2010-02-16 Thread RagingJim
Thanks for the help guys. This worked: x-sqlQuery(conn, select to_char(lsd,'-mm') as yr,ttl_mo_prcp from mo_rains where stn_num=23090) myDF=x myDF[,1]=as.yearmon(myDF[,1]) myDF$R=myDF$TTL_MO_PRCP myDF[,-2] myDF$-substr(myDF$YR,5,8) myDF$mm-substr(myDF$YR,1,4) myDF-subset(myDF,

Re: [R] Using text put into a dialog box

2010-02-16 Thread RagingJim
Thanks Greg, the problem is I have no idea how to return and use what I have typed into the pop up. Add to that the complication that with this query x-sqlQuery(conn, select to_char(lsd,'-mm') as yr,ttl_mo_prcp from mo_rains where stn_num=23090) if I put anything other than a number into

[R] Keyboard

2010-02-16 Thread Steven Martin
All, I installed R-2.10.1 with Readline=no. Now for some reason R does not recognize some key strokes like the directional arrows. I am not sure if Readline is the problem or not. I have tried .Cofigure with Readline = yes but it doesn't fix the problem nor do I really know if readline is the

[R] side-effects in functions that replace object values and attributes

2010-02-16 Thread Stephen Tucker
Hello list, I encountered some surprising behavior in R and wanted to check to see if I was imagining things. Previously, I thought that replacement/setter operators in prefix notation (e.g., `[-`(x,1,y) rather than x[1] - y) did not produce side effects (i.e., left 'x' unchanged), but just

Re: [R] strangeness in Predict() {rms}

2010-02-16 Thread William Dunlap
Both plyr and rms contain an object called .. In plyr it is a closure (the common kind of function) and in rms is is NA. If plyr is attached in front of rms then you get your problem with Predict(). Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From:

Re: [R] side-effects in functions that replace object values andattributes

2010-02-16 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Stephen Tucker Sent: Tuesday, February 16, 2010 5:32 PM To: r-help@r-project.org Subject: [R] side-effects in functions that replace object values andattributes Hello list,

Re: [R] Keyboard

2010-02-16 Thread Sharpie
Steven Martin wrote: All, I installed R-2.10.1 with Readline=no. Now for some reason R does not recognize some key strokes like the directional arrows. I am not sure if Readline is the problem or not. Yes-- readline supplies functionality such as command history. Steven Martin

[R] sql query variable

2010-02-16 Thread RagingJim
This is the very last thing I need to make everything work properly. My query: sqlQuery(conn, select to_char(lsd,'-mm') as yr,ttl_mo_prcp from mo_rains where stn_num=023000) Is there a way to may the stn_num in the query variable, ie make it so that whenever my script is run, the user must

[R] extract the data that match

2010-02-16 Thread Roslina Zakaria
Hi r-users,   I would like to extract the data that match.  Attached is my data: I'm interested in matchind the value in column 'intg' with value in column 'rand_no' cbind(z=z,intg=dd,rand_no = rr)     z  intg rand_no    [1,]  0.00 0.000   0.001    [2,]  0.01 0.000   0.002    [3,]  0.02

[R] Bivariate Uniform distribution

2010-02-16 Thread li li
Hi all, Is there a function in R to calculate the probability, or quantile, or generate random numbers, and so on for bivariate uniform distribution, like for the bivariate normal distribution? Thanks! Hannah [[alternative HTML version deleted]]

[R] Building R from source

2010-02-16 Thread rkevinburton
I found the problem but not a solution. It turns out if I add the following lines to dqrdc2.f I get the error: write(*,300) ldx,n,p 300 format(3i4) I don't get a compile error but I get the seemingly unrelated error in linking R.DLL I guess the question now is, How do I add a

Re: [R] extract the data that match

2010-02-16 Thread Peter Alspach
Tena koe Roslina It is not entirely clear to me what you want to do, but have you looked at match or %in%? Or do you simply want yourData[yourData[,2]==yourData[,3],]? Also, you might need to bear in mind issues with floating point arithmetic which is a frequent question on this list. HTH

Re: [R] extract the data that match

2010-02-16 Thread Sharpie
Roslina Zakaria wrote: Hi r-users,   I would like to extract the data that match. I'm interested in matchind the value in column 'intg' with value in column 'rand_no' Match how? Rows where intg equals rand_no at the same position? The rows of intg that are present somewhere in rand_no

Re: [R] converting character vector hh:mm to chron or strptime 24 clock time vectors

2010-02-16 Thread Jim Lemon
On 02/16/2010 09:47 PM, Alex Anderson wrote: ... This is the problem 6 96.88 2008/04/24 24:00 Error in `$-.data.frame`(`*tmp*`, time2, value = list(sec = c(0, 0, : replacement has 9 rows, data has 10 Hi Alex, You have a problem with an invalid time. The line should read: 6 96.88 2008/05/24

Re: [R] converting character vector hh:mm to chron or strptime 24 clock time vectors

2010-02-16 Thread Sharpie
Jim Lemon wrote: On 02/16/2010 09:47 PM, Alex Anderson wrote: ... This is the problem 6 96.88 2008/04/24 24:00 Error in `$-.data.frame`(`*tmp*`, time2, value = list(sec = c(0, 0, : replacement has 9 rows, data has 10 Hi Alex, You have a problem with an invalid time. The line should

Re: [R] converting character vector hh:mm to chron or strptime 24 clock time vectors

2010-02-16 Thread Jim Lemon
... If it gets too confusing, just coerce your POSIXlt objects to POSIXct objects which don't have issues with odd lengths. Thanks to Mark and Charlie, your messages have enlightened me and hopefully provided a solution for Alex, who was the one with the problem.

Re: [R] Interactive plot (histogram) in R..........possible?

2010-02-16 Thread Greg Snow
This can be done fairly simply using the tkexamp function from the TeachingDemos package. Here are some examples: library(TeachingDemos) histfunc - function(n, mu=0, sigma=1) { x - rnorm(n, mu, sigma) hist(x) } hist.list1 - list( n=list('slider', from=10, to=1,

[R] [Reminder] R/Finance 2010: Applied Finance with R

2010-02-16 Thread Dirk Eddelbuettel
[ Registration for R/Finance 2010 is going strong: after only ten days of registrations one tutorial is already at 65% of capacity, and two others are approaching the 50% mark. Tutorials are capped at fourty participants each, the conference itself may be capped at three

Re: [R] Keyboard

2010-02-16 Thread Erik Iverson
Steven Martin wrote: All, I installed R-2.10.1 with Readline=no. Now for some reason R does not recognize some key strokes like the directional arrows. I am not sure if Readline is the problem or not. What particular OS are you using? In many cases, there is a preconfigured package

Re: [R] converting character vector hh:mm to chron or strptime 24 clock time vectors

2010-02-16 Thread Gabor Grothendieck
Try this (and note that times must be less than 24 hours): Lines - LogData date time + 177.16 2008/04/24 02:00 + 261.78 2008/04/24 04:00 + 375.44 2008/04/24 06:00 + 489.43 2008/04/24 08:00 + 595.83 2008/04/24 10:00 +

Re: [R] Using text put into a dialog box

2010-02-16 Thread Greg Snow
This function will pop up the window, get the number, and return it: tmpfun - function() { tt - tktoplevel() Name - tclVar() entry.Name -tkentry(tt,width=20,textvariable=Name) tkgrid(tklabel(tt,text=Please enter site number.)) tkgrid(entry.Name)

Re: [R] Using text put into a dialog box

2010-02-16 Thread RagingJim
Thanks mate, awesome :) Everything is now working as ordered. Thanks to everyone who has chipped in and helped out this past week, much appreciated!!! -- View this message in context: http://n4.nabble.com/Using-text-put-into-a-dialog-box-tp1555761p1558278.html Sent from the R help mailing list

Re: [R] Bivariate Uniform distribution

2010-02-16 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of li li Sent: Tuesday, February 16, 2010 6:46 PM To: r-help Subject: [R] Bivariate Uniform distribution Hi all, Is there a function in R to calculate the probability, or

Re: [R] error message when downloading packages using the OS X shell

2010-02-16 Thread Jessica Joganic
Thank you all for your help thus far. I have taken care of the destdir issue (you do need to specify a destdir, something I never had to do with OS X 10.4). However, a delightful new message has popped up. Has anyone seen this one before? I've tried both an R CMD INSTALL command from the shell and

[R] How to compute heteroskedasticity-robust LM statistic?

2010-02-16 Thread roach
Anyone using Wooldrige's Introductory Econometrics: A Modern Approach? In the 3rd edition example 8.3, I use the following method to compute heteroskedasticity-robust LM statistic library(car) linear.hypothesis(model,c(avgsen=0,I(avgsen^2)=0) ,test=Chisq,vcov=hccm(model,type=hc0)) The result

Re: [R] sql query variable

2010-02-16 Thread Dieter Menne
RagingJim wrote: This is the very last thing I need to make everything work properly. My query: sqlQuery(conn, select to_char(lsd,'-mm') as yr,ttl_mo_prcp from mo_rains where stn_num=023000) Is there a way to may the stn_num in the query variable, ie make it so that whenever my

[R] Error while installing 'netmodels'

2010-02-16 Thread anupam sinha
Dear all , I am trying to install a package by name 'netmodels' keep on getting the following error : install.packages(netmodels) Warning in install.packages(netmodels) : argument 'lib' is missing: using '/usr/lib64/R/library' also installing the dependency ‘VGAM’ trying

<    1   2