[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’ tryin

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 whenev

[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

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

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

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] 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] 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] 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 avail

[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] 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, resolutio

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. tdata$datetime<-as.POSIXct(str

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

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/

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 r

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 ..

[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 simpl

[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] 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] 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

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

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 > > Hell

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

[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 r

[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

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

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, se

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-8LC_COLLATE=

[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='me

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 wrote: > some more info > > t(t(odbcGetInfo(connection))) > [,1] > DBMS_Name"Adaptive Serve

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 <- lengt

[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 d

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

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] 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] 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 invo

[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] 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.

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 ve

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 Dirigé/

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 wrote: > Max, > > Thank you for your help. Please see my responses below. > > > On Tue, Feb 9, 2010 at 8:20 PM, Max

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 > Populat

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

[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 09:00

[R] Math.factor error message

2010-02-16 Thread Hichem Ben Khedhiri
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 = "NA") column <- 1 nob <- nrow(datamat) y <-

[R] Random center effect

2010-02-16 Thread David Hajage
Hello R users, I'm trying to take into acount the center effect in a clinical study comparing 3 treatments (data from the book Applied Mixed Models in Medicine Statistics by Helen Brown and Robin Prescott): - dbp: diastolic blood pressure at 8 weeks - dbp0: diastolic blood pressure at inclusion -

Re: [R] odfTable: table width and alignment

2010-02-16 Thread Aleksey Naumov
Max, Thank you for your help. Please see my responses below. On Tue, Feb 9, 2010 at 8:20 PM, Max Kuhn wrote: > > I am trying to figure out how to control table width and alignment on the > > page for a table generated by odfTable. Based on reading odfWeave > > documentation (including formatti

[R] General JRI questions

2010-02-16 Thread Ralf B
Hi all, I recently started to work with JRI/rJava and have already run R statements from Java. Since I have larger units encapsulated in R scripts, I would like to run those from Java directly. I was not able to answer the following questions and would appreciate your help on this: How do I run e

Re: [R] False convergence of a glmer model

2010-02-16 Thread Douglas Bates
On Tue, Feb 16, 2010 at 9:38 AM, Shige Song wrote: > Hi Doug, > > Thanks. Next time I will post it to the R-SIG0-mixed-models mailing > list, as you suggested. I have added R-SIG-mixed-models to the cc: list. I suggest we drop the cc: to R-help after this message. > With respect to your questio

Re: [R] Legend Text Font Size

2010-02-16 Thread Uwe Ligges
On 16.02.2010 19:59, Rob Helpert wrote: Hi. I have a plot containing a large number of lines. I have placed a legend in the plot, but with so many lines, the legend takes up a lot of space. I have tried to reduce the spacing between the lines using the legend parameter x.intersp=0.7, but thi

Re: [R] lmer - error asMethod(object) : matrix is not symmetric

2010-02-16 Thread Douglas Bates
On Tue, Feb 16, 2010 at 10:54 AM, Luisa Carvalheiro wrote: > Dear Douglas, > > Thank you for your reply. > Just some extra info on the dataset: In my case Number of obs is 33, > and number of groups of factor(Farm_code) is 12. > This is the information on iterations I get: > > summary(lmer(round(S

Re: [R] Reading sas7bdat files directly

2010-02-16 Thread Annoyia Mouse
If you don't have SAS and still need to read or write sas7bdat files: there is the "World Programming System" (WPS) (commercial software). http://www.teamwpc.co.uk/home/ -- View this message in context: http://n4.nabble.com/Reading-sas7bdat-files-directly-tp1469515p1557807.html Sent from the R

Re: [R] delete repeated values - not unique...

2010-02-16 Thread Alex Yuan
rle() is cool. - PhD Candidate in Statistics Dept. of Mathematics & Statistics University of New Hampshire Durham, NH 03824 USA -- View this message in context: http://n4.nabble.com/delete-repeated-values-not-unique-tp1557625p1557728.html Sent from the R help mailing list archive at Nabble.

[R] Legend Text Font Size

2010-02-16 Thread Rob Helpert
Hi. I have a plot containing a large number of lines. I have placed a legend in the plot, but with so many lines, the legend takes up a lot of space. I have tried to reduce the spacing between the lines using the legend parameter x.intersp=0.7, but this does not compress the legend enough. Is t

Re: [R] Double Integral Minimization Problem

2010-02-16 Thread MVika
Hi, I am using v1.0-4 of adapt and v2.10.1 of R. Thank you, M. -- View this message in context: http://n4.nabble.com/Double-Integral-Minimization-Problem-tp1475150p155.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-proj

[R] SVM e1071

2010-02-16 Thread Anderson de Rezende Rocha
Dear R-users, Does anyone know how to get margins' information using SVM under package e1071? I have a two class classification problem and I'd like to have, for each input example, the distance of this example to the margin just like it's possible to obtain using C-based SVM-light, for instan

Re: [R] RODBC missing values in integer columns

2010-02-16 Thread Rob Forler
some more info > t(t(odbcGetInfo(connection))) [,1] DBMS_Name"Adaptive Server Anywhere" DBMS_Ver "12.70." Driver_ODBC_Ver "03.51" Data_Source_Name "dbname" Driver_Name "Adaptive Server Anywhere" Driver_Ver "09.00.0001" ODBC_Ver "03.52." S

[R] replicating aov results with lmer

2010-02-16 Thread Elizabeth Purdom
I am trying to replicate the results of an aov command with lmer, to understand the syntax, but I can't quite figure it out. I have a dataset from Montgomery p. 520 with a nested and factorial layout. There are 3 fixtures, 2 layouts (the treatments) in a factorial design, but the operators who p

Re: [R] suppress printing within a function

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 1:31 PM, Jarrett Byrnes wrote: I'm working with a few functions (e.g. do.base.descriptions in the netstat package) that, in addition to returning an object with variables I want to extract, also print output. There is no way to turn this default printing behavior off in man

Re: [R] Random Forest

2010-02-16 Thread Liaw, Andy
From: Dror > > Hi, > i'm using randomForest package and i have 2 questions: > 1. Can i drop one tree from an RF object? Yes. > 2. i have a 300 trees forest, but when i use the predict > function on new > data (with predict.all=TRUE) i get only 270 votes. did i do > something wrong? Try to fol

[R] suppress printing within a function

2010-02-16 Thread Jarrett Byrnes
I'm working with a few functions (e.g. do.base.descriptions in the netstat package) that, in addition to returning an object with variables I want to extract, also print output. There is no way to turn this default printing behavior off in many of the functions. Is there a blanket way to su

Re: [R] Triangular filled contour plot

2010-02-16 Thread Walmes Zeviani
Johannes, Some months ago it was posted on R-help a list of packages that handle with ternaryplots, altough none of them can handle surfaceplots, just scatterplots, on a triangular area. The packages were plot.acomp in compositions tri in cwhmisc.cwhtool triax in plotrix ternary in StatDA ternar

Re: [R] delete repeated values - not unique...

2010-02-16 Thread Erik Iverson
Ah, the request was 'hidden' in the subject of the message, apologies! Erik Iverson wrote: Well, can you algorithmically describe what you are trying to do? Your example is not sufficient to determine it. For instance, are you trying to: 1) remove repeated elements of a vector and concatenat

Re: [R] delete repeated values - not unique...

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 12:01 PM, jorgusch wrote: Hello, I must be blind not to see it, but I have the following vector: 4 4 5 6 6 4 What I would like to have as a result is: 4 5 6 4 ?diff > vec <- c(4,4,5,6,6,4) > vec[ c(1, diff(vec)) != 0 ] [1] 4 5 6 4 All repeated values are gone. I c

Re: [R] delete repeated values - not unique...

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 jorgusch > Sent: Tuesday, February 16, 2010 9:01 AM > To: r-help@r-project.org > Subject: [R] delete repeated values - not unique... > > > Hello, > > I must be blind not to see

Re: [R] delete repeated values - not unique...

2010-02-16 Thread Erik Iverson
Well, can you algorithmically describe what you are trying to do? Your example is not sufficient to determine it. For instance, are you trying to: 1) remove repeated elements of a vector and concatenate the first element at the end? 2) remove repeated elements of a vector and concatenate the

Re: [R] delete repeated values - not unique...

2010-02-16 Thread Marc Schwartz
On Feb 16, 2010, at 11:01 AM, jorgusch wrote: > > Hello, > > I must be blind not to see it, but I have the following vector: > > 4 > 4 > 5 > 6 > 6 > 4 > > What I would like to have as a result is: > > 4 > 5 > 6 > 4 > > All repeated values are gone. I cannot use unique for this, as the second

Re: [R] lint for R? and debugging

2010-02-16 Thread Esmail
On 16-Feb-10 09:03, Karl Ove Hufthammer wrote: On Tue, 16 Feb 2010 08:00:09 -0500 Esmail wrote: And along the same lines, any type of interactive debugging utility for R? See this article in R News: 'Debugging Without (Too Many) Tears' http://cran.r-project.org/doc/Rnews/Rnews_2003-3.pdf#pag

[R] delete repeated values - not unique...

2010-02-16 Thread jorgusch
Hello, I must be blind not to see it, but I have the following vector: 4 4 5 6 6 4 What I would like to have as a result is: 4 5 6 4 All repeated values are gone. I cannot use unique for this, as the second 4 would disappear. Is there another fast function for this problem? Thanks in advance

Re: [R] combining dataframes with different row lenght

2010-02-16 Thread fishman.R
If you can specify the questions in more details, that would be more helpful. -- View this message in context: http://n4.nabble.com/combining-dataframes-with-different-row-lenght-tp1557569p1557610.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] margin text warning message NAs coercion

2010-02-16 Thread fishman.R
I have a question for you. What's your purpose to put "additional text" in the margin? In your code, the first expression(A[1]~B[2]) corresponds to text. If you wanna "additional text" together with expression(A[1]~B[2]), you should use paste. If you can clarify what kind of margin you want, that

Re: [R] argh .. if/else .. why?

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 12:15 PM, William Dunlap wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Peter Dalgaard Sent: Tuesday, February 16, 2010 1:33 AM To: Gabor Grothendieck Cc: r-help@r-project.org Subject: Re: [R] argh .. i

Re: [R] Triangular filled contour plot

2010-02-16 Thread Cleber Borges
hello, maybe this code can be useful for you. cleber --- trimage <- function(f){ x = y = seq( 1, 0, l=181 ) t1 = length(x) im = aux = numeric(0) for( i in seq( 1, t1, by = 2 ) ){ #idx = seq( t1**2, i*t1, by = -t1 ) - ((t1 - i):0) idx = seq( i*t1, t1**2, by = t1 )

[R] RODBC missing values in integer columns

2010-02-16 Thread Rob Forler
Hello, We are having some strange issues with RODBC related to integer columns. Whenever we do a sql query the data in a integer column is 150 actual data points then 150 0's then 150 actual data points then 150 0's. However, our database actually has numbers where the 0's are filled in. Furthermo

Re: [R] margin text warning message NAs coercion

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 12:18 PM, e-letter wrote: On 16/02/2010, Peter Ehlers wrote: On 2010-02-16 9:21, e-letter wrote: Readers, I tried to the following commands: plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) mtext(expression(A[1]~B[2]),"additional text",side=3,line=1) Your plot

Re: [R] margin text warning message NAs coercion

2010-02-16 Thread Peter Ehlers
On 2010-02-16 10:18, e-letter wrote: On 16/02/2010, Peter Ehlers wrote: On 2010-02-16 9:21, e-letter wrote: Readers, I tried to the following commands: plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) mtext(expression(A[1]~B[2]),"additional text",side=3,line=1) Your plot() call is

Re: [R] argh .. if/else .. why?

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 Peter Dalgaard > Sent: Tuesday, February 16, 2010 1:33 AM > To: Gabor Grothendieck > Cc: r-help@r-project.org > Subject: Re: [R] argh .. if/else .. why? > > Gabor Grothendieck wr

Re: [R] margin text warning message NAs coercion

2010-02-16 Thread e-letter
On 16/02/2010, Peter Ehlers wrote: > On 2010-02-16 9:21, e-letter wrote: >> Readers, >> >> I tried to the following commands: >> >> plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) >> mtext(expression(A[1]~B[2]),"additional text",side=3,line=1) > > Your plot() call is not reproducible. > >

[R] popbio and stochastic lambda calculation

2010-02-16 Thread Shawn Morrison
Hello R users, I am trying to calculate the stochastic lambda for a published matrix population model using the popbio package. Unfortunately, I have been unable to match the published results. Can anyone tell me whether this is due to slightly different methods being used, or have I gone wr

Re: [R] margin text warning message NAs coercion

2010-02-16 Thread Peter Ehlers
On 2010-02-16 9:21, e-letter wrote: Readers, I tried to the following commands: plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) mtext(expression(A[1]~B[2]),"additional text",side=3,line=1) Your plot() call is not reproducible. Anyway, try mtext(expression(A[1]~B[2]~~"additional tex

[R] OT: computing percentage changes with negative and zero values?

2010-02-16 Thread Liviu Andronic
Dear all I need to compute percentage changes of my data, but unfortunately they contain both negative and zero values, and I am quite confused on how to proceed. Searching the internet I found that many people ran into similar issues, with no obvious solution available. The last couple of weeks I

Re: [R] reading quattro pro spreadsheet .qpw into R

2010-02-16 Thread Marc Schwartz
On Feb 16, 2010, at 10:35 AM, Barry Rowlingson wrote: > On Tue, Feb 16, 2010 at 4:12 PM, stephen sefick wrote: >> I have many quattro pro spreadsheets and no quattro pro. Is there a >> way to access the data using R, or any other solution that anyone can >> think of? > > OpenOffice claims it ca

Re: [R] Sampling from Bivariate Uniform Distribution

2010-02-16 Thread Greg Snow
The correlation will not be exactly 0, but will represent a draw from an independent population. There may be something in the copulas package to allow for more independence (but that about exhausts my knowledge of that package). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermou

Re: [R] lmer - error asMethod(object) : matrix is not symmetric

2010-02-16 Thread Luisa Carvalheiro
Dear Douglas, Thank you for your reply. Just some extra info on the dataset: In my case Number of obs is 33, and number of groups of factor(Farm_code) is 12. This is the information on iterations I get: summary(lmer(round(SR_SUN)~Dist_NV + (1|factor(Farm_code)) , family=poisson, verbose =TRUE))

Re: [R] multiple-test correlation

2010-02-16 Thread Greg Snow
?p.adjust -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Manuel Jesús López Rodríguez > Sent: Sunday, Februa

Re: [R] Does the R "statistical language includes modules/packagesto carry out nonlinear optimization similar to the SAS NLINand NLP procedures?

2010-02-16 Thread Bert Gunter
Randall: Are you familiar with R's Search facilities? If not, don't you think you should be? If so, why don't you try using them BEFORE posting on this list. ?help ?help.search help.search("optimization") ##gives several alternatives Bert Gunter Genentech Nonclinical Biostatistics -Orig

Re: [R] reading quattro pro spreadsheet .qpw into R

2010-02-16 Thread Tom Backer Johnsen
stephen sefick wrote: I have many quattro pro spreadsheets and no quattro pro. Is there a way to access the data using R, or any other solution that anyone can think of? thanks, One possibility is to download the trial version of Corel Office and use that to convert the files to something m

Re: [R] reading quattro pro spreadsheet .qpw into R

2010-02-16 Thread Barry Rowlingson
On Tue, Feb 16, 2010 at 4:12 PM, stephen sefick wrote: > I have many quattro pro spreadsheets and no quattro pro.  Is there a > way to access the data using R, or any other solution that anyone can > think of? OpenOffice claims it can read Quattro Pro 6.0 'wb2' files, but maybe they are differen

[R] Reminder: ASA Stat Comp/Graph Chambers Award Competition Deadline 2/22

2010-02-16 Thread Fei Chen
Just a gentle reminder that the deadline for submission to the Chambers Award Competition is fast approaching. All application materials must be received by 5:00pm EST, Monday, February 22, 2010. For submission guidelines, please visit http://stat-computing.org/awards/jmc/announcement.h

Re: [R] Does the R "statistical language includes modules/packages to carry out nonlinear optimization similar to the SAS NLIN and NLP procedures?

2010-02-16 Thread David Winsemius
On Feb 16, 2010, at 11:09 AM, Powers, Randall - BLS wrote: Hello R folks, I'm hoping the answer to the question in the subject line. I have in the past used SAS PROC NLIN and PROC NLP to carry out nonlinear optimizations. I'm wondering if there is analogous ways for doing this using R. If so,

Re: [R] for loop Vs apply function Vs foreach (REvolution enhancement)

2010-02-16 Thread Steve Lianoglou
Hi, > 2. foreach (REvolution enhancement) > >seems the rationale of this function is to facilitate the use of >multithreading to enhance the for loop speed. Given a moderate time >sensitivity (process must run fast but a gain of 10-20% speed seen as probably >not justifying the additional learn

[R] Build failure on Solaris 10 (SPARC)

2010-02-16 Thread Dr. David Kirkby
I'm trying to build R 2.10.1 on a Sun Blade 1000 running Solaris 10 (03/05 release). I've installed iconv 1.13.1 and used: CPPFLAGS="-I /export/home/drkirkby/sage-4.3.3.alpha0/local/include" (which is where iconv is) LDFLAGS= -R/export/home/drkirkby/sage-4.3.3.alpha0/local/lib -L/export/home/d

[R] line options on read.spss

2010-02-16 Thread Never Read
Hi, I am a newbie here. I like the ability to read SPSS file since it comes with other info. My problem with it is that it seems that I have to read the whole file into the memory. For the csv file, I can read part of it and dump them into the database so that even though I don't have a power

[R] Does the R "statistical language includes modules/packages to carry out nonlinear optimization similar to the SAS NLIN and NLP procedures?

2010-02-16 Thread Powers, Randall - BLS
Hello R folks, I'm hoping the answer to the question in the subject line. I have in the past used SAS PROC NLIN and PROC NLP to carry out nonlinear optimizations. I'm wondering if there is analogous ways for doing this using R. If so, could someone please point me to some literature that would he

[R] combining dataframes with different row lenght

2010-02-16 Thread Juan Pablo Fededa
Hello list, I want to combine dataframes from tsv files which have different row lenght. I tryed cbind but doesn't work. Is there an easy way to fill with NAs till a common point of rows for all the dataframes and then merge them? Any other idea? Thanks a lot, Juan [[alternative HTML ve

[R] margin text warning message NAs coercion

2010-02-16 Thread e-letter
Readers, I tried to the following commands: plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) mtext(expression(A[1]~B[2]),"additional text",side=3,line=1) I receive the text that I want, but the command terminal shows the following response: Warning message: NAs introduced by coercion in

[R] reading quattro pro spreadsheet .qpw into R

2010-02-16 Thread stephen sefick
I have many quattro pro spreadsheets and no quattro pro. Is there a way to access the data using R, or any other solution that anyone can think of? thanks, -- Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for u

[R] Odp: error : unused argument(s) when boxplot

2010-02-16 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 16.02.2010 15:18:21: > Dear all, > > I am a total beginner in R, so sorry if this is the wrong place. I am using R > 2.10.1 on a Mac (Mac OS 10.6.2). > I have this small dataset : > growth sugar > 75 C > 72 C > 73 C > 61 F > 67

[R] Random Forest

2010-02-16 Thread Dror
Hi, i'm using randomForest package and i have 2 questions: 1. Can i drop one tree from an RF object? 2. i have a 300 trees forest, but when i use the predict function on new data (with predict.all=TRUE) i get only 270 votes. did i do something wrong? Thanks -- View this message in context: http

Re: [R] Total and heading of portfoilo table

2010-02-16 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 16.02.2010 08:05:08: > Hi! > > I am not expert in R, but perhaps you can try the following - > > X = as.numeric(read.csv('quantity.csv')) > Y = read.csv('equity_price.csv') > Y = Y[, -1] > > Z = X*Y > > port_val = NULL > > for(i in 1 : nrow(Z))

  1   2   >