Re: [R] Problem in installing and starting Rattle

2010-11-15 Thread Graham Williams
On 15 November 2010 15:30, kgorahava kgorah...@gmail.com wrote: Hello, I am trying to install and run Rattle on my Dell Laptop and I have Windows 7 OS. The following three commands executed successfully : install.packages(RGtk2) install.packages(rattle) library(rattle) Rattle:

Re: [R] Problems loading xlsx

2010-11-15 Thread Paolo Rossi
Thanks Jim that is my second best option but would hope to get xlsx working as it seems a more coveninet fit to xlsx files Paolo On 15 November 2010 00:12, jim holtman jholt...@gmail.com wrote: If you are running on WIndows, I would suggest that you use the RODBC package and the

Re: [R] R package 'np' problems

2010-11-15 Thread P Ehlers
Chris Carleton wrote: Hi List, I'm trying to get a density estimate for a point of interest from an npudens object created for a sample of points. I'm working with 4 variables in total (3 continuous and 1 unordered discrete - the discrete variable is the character column in training.csv). When

[R] Version 2.12.0 exe file

2010-11-15 Thread Morris Anglin
I have R version 2.9.1 on my computer and the anlaysis is not working because I need to update to R version 2.12.0 the latest release. The person incharge of IT tried to download R version 2.12.0 but .exe file referenced in install isn't there -What might we be doing wrong? We have

Re: [R] cannot see the y-labels (getting cut-off)

2010-11-15 Thread P Ehlers
jim holtman wrote: increase the margins on the plot: par(mar=c(4,7,2,1)) plot(1:5,y,ylab='',yaxt='n' ); axis(2, at=y, labels=formatC(y,big.mark=,,format=fg),las=2,cex=0.1); That's what I would do, but if you want to see how cex works, use cex.axis=0.5. Check out ?par. -Peter Ehlers On

Re: [R] Version 2.12.0 exe file

2010-11-15 Thread P Ehlers
Morris Anglin wrote: I have R version 2.9.1 on my computer and the anlaysis is not working because I need to update to R version 2.12.0 the latest release. The person incharge of IT tried to download R version 2.12.0 but .exe file referenced in install isn't there -What might we be doing

[R] Path to nodes in ctree package party

2010-11-15 Thread Sven Garbade
Hallo list, I'm wondering if there is a way to extract the path to terminal nodes in a BinaryTree object, e.g. ctree, like the function path.rpart in package rpart. Thanks, Sven __ R-help@r-project.org mailing list

Re: [R] Problem in installing and starting Rattle

2010-11-15 Thread Dieter Menne
kgorahava wrote: I am trying to install and run Rattle on my Dell Laptop and I have Windows 7 OS. install.packages(RGtk2) install.packages(rattle) library(rattle) Rattle: Graphical interface for data mining using R. Version 2.5.47 Copyright (c) 2006-2010 Togaware Pty Ltd. Type

Re: [R] Problem in installing and starting Rattle

2010-11-15 Thread Prof Brian Ripley
On Mon, 15 Nov 2010, Dieter Menne wrote: kgorahava wrote: I am trying to install and run Rattle on my Dell Laptop and I have Windows 7 OS. install.packages(RGtk2) install.packages(rattle) library(rattle) Rattle: Graphical interface for data mining using R. Version 2.5.47 Copyright (c)

[R] Problem with lm4 and lapack library

2010-11-15 Thread Javier Bustamante
I have R under Linux Kubuntu Hardy Heron 8.04 LTS. I am trying to install package 'lme4' and get the following error: * installing *source* package ‘lme4’ ... ** libs gcc -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include -I/usr/lib/R/library/Matrix/include

Re: [R] Sweave question

2010-11-15 Thread Dieter Menne
Duncan Murdoch-2 wrote: See SweavePDF() in the patchDVI package on R-forge. In case googling patchDVI only show a few Japanese Pages, and search for patchDVI in R-Forge gives nothing: try https://r-forge.r-project.org/projects/sweavesearch/ (or did I miss something obvious, Duncan?)

Re: [R] Sweave question

2010-11-15 Thread Duncan Murdoch
On 15/11/2010 6:22 AM, Dieter Menne wrote: Duncan Murdoch-2 wrote: See SweavePDF() in the patchDVI package on R-forge. In case googling patchDVI only show a few Japanese Pages, and search for patchDVI in R-Forge gives nothing: try https://r-forge.r-project.org/projects/sweavesearch/

[R] mgarch-BEKK

2010-11-15 Thread TeBe
Dear all.. Can anybody help me with mgarchBEKK? After estimate bekk model, i want to check whether the residuals meet the required assumptions. Can i perform Portmanteau test, the ARCH-LM test, plots of the AC and PAC functions of the residuals? Can you give some example with the

[R] comparing levels of aggregation with negative binomial models

2010-11-15 Thread Ben Raymond
Dear R community, I would like to compare the degree of aggregation (or dispersion) of bacteria isolated from plant material. My data are discrete counts from leaf washes. While I do have xy coordinates for each plant, it is aggregation in the sense of the concentration of bacteria in

[R] How to move an internal function to external keeping same environment?

2010-11-15 Thread Matthieu Stigler
Hi I have within a quite big function foo1, an internal function foo2. Now, in order to have a cleaner code, I wish to have the internal foo2 as external. This foo2 was using arguments within the foo1 environment that were not declared as inputs of foo2, which works as long as foo2 is within

Re: [R] How to move an internal function to external keeping same environment?

2010-11-15 Thread Gabor Grothendieck
On Mon, Nov 15, 2010 at 7:48 AM, Matthieu Stigler matthieu.stig...@gmail.com wrote: Hi I have within a quite big function foo1, an internal function foo2. Now, in order to have a cleaner code, I wish to have the internal foo2 as external. This foo2 was using arguments within the foo1

Re: [R] How to move an internal function to external keeping same environment?

2010-11-15 Thread Duncan Murdoch
On 15/11/2010 7:48 AM, Matthieu Stigler wrote: Hi I have within a quite big function foo1, an internal function foo2. Now, in order to have a cleaner code, I wish to have the internal foo2 as external. This foo2 was using arguments within the foo1 environment that were not declared as inputs of

Re: [R] R package 'np' problems

2010-11-15 Thread Chris Carleton
Hi Peter and List, I realized the err of my ways here. Thanks for the response; I appreciate the help. The struggles of self-taught statistics and maths continue! Chris On 15 November 2010 04:34, P Ehlers ehl...@ucalgary.ca wrote: Chris Carleton wrote: Hi List, I'm trying to get a density

Re: [R] [klaR package] [NaiveBayes] warning message numerical 0 probability

2010-11-15 Thread Uwe Ligges
On 03.11.2010 16:26, Fabon Dzogang wrote: Hi, I run R 2.10.1 under ubuntu 10.04 LTS (Lucid Lynx) and klaR version 0.6-4. I compute a model over a 2 classes dataset (composed of 700 examples). To that aim, I use the function NaiveBayes provided in the package klaR. When I then use the

[R] Access DDE Data

2010-11-15 Thread Santosh Srinivas
Hello Group, Is it possible to access DDE data from R? Thanks in advance for any pointers. S __ 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

[R] Zero truncated Poisson distribution R2WinBUGS

2010-11-15 Thread julien martin
I am using a binomial mixture model to estimate abundance (N) and detection probability (p) using simulated count data: -Each site has a simulated abundance that follow a Poisson distribution with lambda = 5 -There are 200 simulated sampled sites -3 repeated counts at each site - only 50 percent

Re: [R] Surprising behavior using seq()

2010-11-15 Thread Vadim Patsalo
Patrick and Bert, Thank you both for you replies to my question. I see how my naïve expectations fail to floating point arithmetic. However, I still believe there is an underlying problem. It seems to me that when asked, c(7.7, 7.8, 7.9) %in% seq(4, 8, by=0.1) [1] TRUE FALSE TRUE R

Re: [R] likelyhood maximization problem with polr

2010-11-15 Thread blackscorpio
Hello, Thanks for your answer. I will try this function to see if it gives equivalent results that those obtained with polr()+dropterm() (in a case where polr() works). Many thanks -- View this message in context:

Re: [R] Replicate Excel's LOGEST worksheet function in R

2010-11-15 Thread cran . 30 . miller_2555
On Sat, Nov 13, 2010 at 10:37 PM, Jeff Newmiller - jdnew...@dcn.davis.ca.us +cran+miller_2555+a7f4a7aeab.jdnewmil#dcn.davis.ca...@spamgourmet.comwrote: Anyway, I recommend you learn from David before criticizing his assistance. cran.30.miller_2...@spamgourmet.com On Fri, Nov 12, 2010 at 5:28

Re: [R] interpretation of coefficients in survreg AND obtaining the hazard function

2010-11-15 Thread Terry Therneau
1. The weibull is the only distribution that can be written in both a proportional hazazrds for and an accelerated failure time form. Survreg uses the latter. In an ACF model, we model the time to failure. Positive coefficients are good (longer time to death). In a PH model, we model the

Re: [R] ... predict.coxph

2010-11-15 Thread Terry Therneau
If you are looking at radioactive decay maybe but how often do you actually see exponential KM curves in real life? Exponential curves are rare. But proportional hazards does not imply exponential. A trial design could in fact try to get all the control sample to event at the same time if

Re: [R] Surprising behavior using seq()

2010-11-15 Thread Duncan Murdoch
On 15/11/2010 9:24 AM, Vadim Patsalo wrote: Patrick and Bert, Thank you both for you replies to my question. I see how my naïve expectations fail to floating point arithmetic. However, I still believe there is an underlying problem. It seems to me that when asked, c(7.7, 7.8, 7.9) %in%

Re: [R] Surprising behavior using seq()

2010-11-15 Thread P Ehlers
Vadim Patsalo wrote: Patrick and Bert, Thank you both for you replies to my question. I see how my naïve expectations fail to floating point arithmetic. However, I still believe there is an underlying problem. It seems to me that when asked, c(7.7, 7.8, 7.9) %in% seq(4, 8, by=0.1) [1]

[R] Help with Hist

2010-11-15 Thread Steve Sidney
Dear list I am trying to re-scale a histogram and using hist() but can not seem to create a reduced scale where the upper values are not plotted. What I have is about 100 of which 80 or so are between a value of 0 and 40 , one or two in the hundreds and an outlier around 2000. What I would

[R] Null values in R

2010-11-15 Thread Raji
Hi R-helpers , can you please let me know the methods in which NULL values can be handled in R? Are there any generic commands/functions that can be given in a workspace,so that the NULL values occuring in that workspace (for any datasets that are loaded , any output that is calculated) , are

Re: [R] RCurl and cookies in POST requests

2010-11-15 Thread Christian M.
Hello Duncan. Thanks for having a look at this. As soon as I get home I'll try your suggestion. BTW, the link to the omega-help mailing list seems to be broken: http://www.omegahat.org/mailman/listinfo/ Thank you. chr Duncan Temple Lang (Monday 15 November 2010, 01:02): Hi Christian

[R] How to Read a Large CSV into a Database with R

2010-11-15 Thread Anthony Damico
Hi, I'm working in R 2.11.1 x64 on Windows x86_64-pc-mingw32. I'm trying to insert a very large CSV file into a SQLite database. I'm pretty new to working with databases in R, so I apologize if I'm overlooking something obvious here. I'm trying to work with the American Community Survey data,

Re: [R] jackknife-after-bootstrap

2010-11-15 Thread Tim Hesterberg
Can someone help me about detection of outliers using jackknife after bootstrap algorithm? A simple procedure is to calculate the mean of the bootstrap statistics for all bootstrap samples that omit the first of the original observations. Repeat for the second, third, ... original observation.

Re: [R] Help with Hist

2010-11-15 Thread Ivan Calandra
Hi, I think you should also give the upper extreme: x - c(rnorm(80)+10, 101:110, 2001:2010) hist(x, breaks=c(0, 20, 40, 60, 80, 100, 200, 500)) Error in hist.default(x, breaks = c(0, 20, 40, 60, 80, 100, 200, 500)) : some 'x' not counted; maybe 'breaks' do not span range of 'x' hist(x,

Re: [R] Null values in R

2010-11-15 Thread jim holtman
Are you talking about NULL or NA that may occur in some data? Can you give an example of what your concern is and what set of operations you want to do. If they are NAs, there are some standard ways that they can be handled. On Mon, Nov 15, 2010 at 9:55 AM, Raji raji.sanka...@gmail.com wrote:

Re: [R] ... predict.coxph

2010-11-15 Thread Mike Marchywka
From: thern...@mayo.edu To: james.whan...@gmail.com Date: Mon, 15 Nov 2010 08:43:04 -0600 CC: r-help@r-project.org Subject: Re: [R] ... predict.coxph If you are looking at radioactive decay maybe but how often do you actually see exponential

Re: [R] Help with Hist

2010-11-15 Thread Dieter Menne
SteveSB wrote: What I have is about 100 of which 80 or so are between a value of 0 and 40 , one or two in the hundreds and an outlier around 2000. Have a look at gap.barplot in package plotrix. Personally, I prefer to use xlim(x(0,100) in this case and add one outlier at t=2000 in the

Re: [R] Null values in R

2010-11-15 Thread Jonathan P Daily
Would ?is.null be what you are looking for? -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we,

[R] how to store package options over sessions?

2010-11-15 Thread Mark Heckmann
I want to define some options for my package the user may change. It would be convenient if the changes could be saved when terminating an R session and recovered automatically on the next package load. What is the standard way to implement this? TIA Mark

Re: [R] How to Read a Large CSV into a Database with R

2010-11-15 Thread Dieter Menne
Anthony-107 wrote: Hi, I'm working in R 2.11.1 x64 on Windows x86_64-pc-mingw32. I'm trying to insert a very large CSV file into a SQLite database. Better use an external utility if this is a one-time import for this job: http://sqlitebrowser.sourceforge.net/ Dieter -- View this

Re: [R] Help with Hist

2010-11-15 Thread Ben Bolker
Steve Sidney sbsidney at mweb.co.za writes: I am trying to re-scale a histogram and using hist() but can not seem to create a reduced scale where the upper values are not plotted. What I have is about 100 of which 80 or so are between a value of 0 and 40 , one or two in the hundreds and

Re: [R] Help with Hist

2010-11-15 Thread sbsidney
Thanks What you have suggested of course works but I am trying to reduce the 'ugliness'. Anybody got any other ideas? Regards Steve Sent from my BlackBerry® wireless device -Original Message- From: Ivan Calandra ivan.calan...@uni-hamburg.de Sender: r-help-boun...@r-project.org Date:

Re: [R] About upgrade R

2010-11-15 Thread John C Frain
Tal My main use of R now is on Windows 7. As explained I always retain at least one previous version on windows 7 PCs. My upgrade is done as follows - 1) Download and install the binary install program for R and install. 2) Rename the library directory (default - C:\Program

[R] repository of earlier Windows versions of R packages

2010-11-15 Thread Jonathan Williams
Dear Helpers, I was trying to find a repository of earlier Windows versions of R packages. However, while I can find the Archives for Linux versions (in the Old Sources section of each package's Downloads) , I cannot find one for Windows versions. Does such a repository exist? If so, where can

Re: [R] Kalman Filter

2010-11-15 Thread Garten Stuhl
Hello, thanks for answer my Question. I prefer use KalmanLike(y, mod, nit = 0, fast=TRUE). For parameter estimating I have a given time series. In these are several components: Season and noise; furthermore it gives a mean reversion process. The season is modelled as a fourierpolynom. From the

Re: [R] Problem in installing and starting Rattle

2010-11-15 Thread Feng Mai
I also have the problem trying to start rattle Windows 7 32-bit R 2.12.0 When I try library(rattle) I get an error message The procedure entry point deflateSetHeader could not be located in the dynamic link library zilb1.dll I hit OK and it prompts me to install GTK+ again. I tried to uninstall

Re: [R] How to move an internal function to external keeping same environment?

2010-11-15 Thread Matthieu Stigler
Le 15. 11. 10 14:14, Duncan Murdoch a écrit : On 15/11/2010 7:48 AM, Matthieu Stigler wrote: Hi I have within a quite big function foo1, an internal function foo2. Now, in order to have a cleaner code, I wish to have the internal foo2 as external. This foo2 was using arguments within the foo1

Re: [R] How to Read a Large CSV into a Database with R

2010-11-15 Thread Gabor Grothendieck
On Mon, Nov 15, 2010 at 10:07 AM, Anthony Damico ajdam...@gmail.com wrote: Hi, I'm working in R 2.11.1 x64 on Windows x86_64-pc-mingw32.  I'm trying to insert a very large CSV file into a SQLite database.  I'm pretty new to working with databases in R, so I apologize if I'm overlooking

[R] merge two dataset and replace missing by 0

2010-11-15 Thread Kate Hsu
Hi r users, I have two data sets (X1, X2). For example, time1-c( 0, 8, 15, 22, 43, 64, 85, 106, 127, 148, 169, 190 ,211 ) outpue1-c(171 ,164 ,150 ,141 ,109 , 73 , 47 ,26 ,15 ,12 ,6 ,2 ,1 ) X1-cbind(time1,outpue1) time2-c( 0 ,8 ,15 , 22 ,43 , 64 ,85 ,106 ,148) output2-c( 5

Re: [R] Fetching data

2010-11-15 Thread Feng Mai
IMO it is not possible. The code behind aspx page queries data from a database server and display it on the webpage. Maithula Chandrashekhar wrote: Dear all R users, I am wondering is there any procedure exists on R to fetch data directly from

Re: [R] Kalman Filter

2010-11-15 Thread John Kerpel
Try the most excellent package dlm written by Giovanni Petris for your all your Kalman filter needs. Also buy the accompanying book - it really integrates the dlm package with the theory behind it. Best, John On Mon, Nov 15, 2010 at 8:39 AM, Garten Stuhl gartenstu...@googlemail.comwrote:

Re: [R] Problem in installing and starting Rattle

2010-11-15 Thread Feng Mai
Ok to follow up my post, I finally got rattle and RGtk2 to work. The trick is when R prompts me to install Gtk2+ I still hit yes but after the download, once the installation process starts I close the R Gui window. After Gtk2+ installation is complete I start R again and it worked. -- View

Re: [R] repository of earlier Windows versions of R packages

2010-11-15 Thread Uwe Ligges
On 15.11.2010 15:52, Jonathan Williams wrote: Dear Helpers, I was trying to find a repository of earlier Windows versions of R packages. However, while I can find the Archives for Linux versions (in the Old Sources section of each package's Downloads) , I cannot find one for Windows

Re: [R] merge two dataset and replace missing by 0

2010-11-15 Thread Uwe Ligges
See ?merge with argument all=TRUE and replace by 0 afterwards. Uwe Ligges On 15.11.2010 16:42, Kate Hsu wrote: Hi r users, I have two data sets (X1, X2). For example, time1-c( 0, 8, 15, 22, 43, 64, 85, 106, 127, 148, 169, 190 ,211 ) outpue1-c(171 ,164 ,150 ,141 ,109 , 73 , 47 ,26

Re: [R] merge two dataset and replace missing by 0

2010-11-15 Thread David Winsemius
On Nov 15, 2010, at 10:42 AM, Kate Hsu wrote: Hi r users, I have two data sets (X1, X2). For example, time1-c( 0, 8, 15, 22, 43, 64, 85, 106, 127, 148, 169, 190 , 211 ) outpue1-c(171 ,164 ,150 ,141 ,109 , 73 , 47 ,26 ,15 ,12 ,6 , 2 ,1 ) X1-cbind(time1,outpue1) time2-c( 0

Re: [R] How to move an internal function to external keeping same environment?

2010-11-15 Thread Gabor Grothendieck
On Mon, Nov 15, 2010 at 10:49 AM, Matthieu Stigler matthieu.stig...@gmail.com wrote: I have limited understanding of Duncan's points but will follow your advice not to do it like this. If I am nervertheless quit keen to use foo2 externally, is the use of either assign() in foo1, or mget() in

[R] R crash

2010-11-15 Thread Jeremy MAZET
We distribute several R applications using the tcltk package on different servers or PC (Windows XP). On some machines and in a not reproducible way, all the R windows disappear when using functions like tkgetSaveFile or tkchooseDirectory. The R application remains open (the Rgui.exe processus

Re: [R] merge two dataset and replace missing by 0

2010-11-15 Thread Gabor Grothendieck
On Mon, Nov 15, 2010 at 10:42 AM, Kate Hsu yhsu.rh...@gmail.com wrote: Hi r users, I have two data sets (X1, X2). For example, time1-c( 0,   8,  15,  22,  43,  64,  85, 106, 127, 148, 169, 190 ,211 ) outpue1-c(171 ,164 ,150 ,141 ,109 , 73 , 47  ,26  ,15  ,12   ,6   ,2   ,1 )

Re: [R] merge two dataset and replace missing by 0

2010-11-15 Thread Kate Hsu
Thanks for all of your help. It works to me. Kate On Mon, Nov 15, 2010 at 10:06 AM, David Winsemius dwinsem...@comcast.netwrote: On Nov 15, 2010, at 10:42 AM, Kate Hsu wrote: Hi r users, I have two data sets (X1, X2). For example, time1-c( 0, 8, 15, 22, 43, 64, 85, 106, 127, 148,

Re: [R] Fetching data

2010-11-15 Thread Barry Rowlingson
On Mon, Nov 15, 2010 at 3:46 PM, Feng Mai maif...@gmail.com wrote: IMO it is not possible. The code behind aspx page queries data from a database server and display it on the webpage. That doesn't make it possible. Your web browser is sending a request to the web server, and whatever happens

Re: [R] Help with Hist

2010-11-15 Thread Ivan Calandra
Well, another possibility would be to edit the plot so that you cut the empty part (between 300 and 2000). There might be some function that can do it, maybe the plotrix::gap.barplot() that Dieter already told you about. Le 11/15/2010 16:22, sbsid...@mweb.co.za a écrit : Thanks What you have

Re: [R] How to Read a Large CSV into a Database with R

2010-11-15 Thread Anthony Damico
Hi Gabor, Thank you for the prompt reply. I definitely looked over all of the examples on the code.google.com sqldf page before sending, which is why I wrote the code read.csv.sql(ss09pusa.csv , sql=create table ss09pusa as select * from file , dbname=sqlite) directly pulled from their code --

Re: [R] jackknife-after-bootstrap

2010-11-15 Thread ufuk beyaztas
I am always trying but i could not do it. Are there any example about this -- View this message in context: http://r.789695.n4.nabble.com/Re-jackknife-after-bootstrap-tp3043213p3043398.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Integrate to 1? (gauss.quad)

2010-11-15 Thread Doran, Harold
Thank you, Doug. I am still missing something here. Should this simply be sum(f(x_i) * w_i) where x_i is node i and w_i is the weight at node i? So, my function f(x) = (1/(s*sqrt(2*pi))) * exp(-((qq$nodes-mu)^2/(2*s^2))) would then be multiplied only by the weights, qq$weights Here is some

Re: [R] RGoogleDocs stopped working

2010-11-15 Thread Harlan Harris
Thanks, Duncan. Finally getting a chance to follow up on this... I tried again, changing and resetting my password, and trying to specify my login and password manually in the getGoogleDocsConnection argument list. I also tried removing either or both of the service and error options. No luck in

Re: [R] How to Read a Large CSV into a Database with R

2010-11-15 Thread Gabor Grothendieck
On Mon, Nov 15, 2010 at 11:46 AM, Anthony Damico ajdam...@gmail.com wrote: Hi Gabor, Thank you for the prompt reply.  I definitely looked over all of the examples on the code.google.com sqldf page before sending, which is why I wrote the code read.csv.sql(ss09pusa.csv , sql=create table

[R] plot.dendrogram() plot margins

2010-11-15 Thread francois fauteux
Hello, Is it possible to remove those extra margins on the sample axis from plot.dendrogram: par(oma=c(0,0,0,0),mar=c(0,0,0,0)) ddr-as.dendrogram(hclust(dist(matrix(sample(1:1000,200),nrow=100 stats:::plot.dendrogram(ddr,horiz=F,axes=F,yaxs=i,leaflab=none) vs.

Re: [R] Sweave question

2010-11-15 Thread Ralf B
Thank you for all your comment. In result of own research I found this method that seems to do what I want in addition to your suggestions: tools::texi2dvi(myfile.tex, pdf=TRUE) Thanks again, Ralf On Mon, Nov 15, 2010 at 6:42 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 15/11/2010

[R] rotate column names in large matrix

2010-11-15 Thread Lara Poplarski
Dear List, I have a large (1600*1600) matrix generated with symnum, that I am using to eyeball the structure of a dataset. I have abbreviated the column names with the abbr.colnames option. One way to get an even more compact view of the matrix would be to display the column names rotated by

[R] Sweave: Conditional code chunks?

2010-11-15 Thread Ralf B
I have a code junk that produces a figure. In my special case, however, data does not always exist. In cases where data exists, the code chunk is of course trival (case #1), however, what do I do for case # 2 where the data does not exist? I can obviously prevent the code from being executed by

[R] Non-positive definite cross-covariance matrices

2010-11-15 Thread Jeff Bassett
I am creating covariance matrices from sets of points, and I am having frequent problems where I create matrices that are non-positive definite. I've started using the corpcor package, which was specifically designed to address these types of problems. It has solved many of my problems, but I

[R] RE : Sweave: Conditional code chunks?

2010-11-15 Thread Wolfgang RAFFELSBERGER
Hi Ralf, I first create (or not) the figure as a separate file(s) and then use conditional LaTeX to display the existing file(s) (exactely where I want it/them to appear). This also works with png etc, but you'll have to specify the extensions. Just be careful if you change paths ... This

Re: [R] How to Read a Large CSV into a Database with R

2010-11-15 Thread Anthony Damico
Hi Gabor, Thank you for your willingness to help me through this. The code you sent works on my machine exactly the same way as it does on yours. Unfortunately, when I run the same code on the 1.3GB file, it creates the table structure but doesn't read in a single line [confirmed with

Re: [R] Sweave question

2010-11-15 Thread Duncan Murdoch
On 15/11/2010 12:38 PM, Ralf B wrote: Thank you for all your comment. In result of own research I found this method that seems to do what I want in addition to your suggestions: tools::texi2dvi(myfile.tex, pdf=TRUE) Sure, but this doesn't quite answer your original question: you can't pass

Re: [R] rotate column names in large matrix

2010-11-15 Thread Joshua Wiley
Hi Lara, Hmm, I've never seen column names rotated in R (certainly you could in graphics, etc. and this should do it in that case: lapply(strsplit(colnames(x), ''), paste, collapse = \n) ). You could transpose the matrix so the columns become the rows and then just have numbers (1:1600) as the

Re: [R] Merge postscript files into ps/pdf

2010-11-15 Thread Patrick Connolly
On Fri, 12-Nov-2010 at 03:29PM -0500, Ralf B wrote: | I know such programs, however, for my specific problem I have an R | script that creates a report (which I have to create many times) | and I would like to append about 100 single paged post scripts at | the end as appendix. File names are

Re: [R] How to Read a Large CSV into a Database with R

2010-11-15 Thread Mike Marchywka
From: ajdam...@gmail.com Date: Mon, 15 Nov 2010 13:28:40 -0500 To: ggrothendi...@gmail.com; r-help@r-project.org Subject: Re: [R] How to Read a Large CSV into a Database with R Hi Gabor, Thank you for your willingness to help me through

[R] Need help with pointLabels()

2010-11-15 Thread Craig Starger
Hello R-list, I am plotting a weighted linear regression in R. The points on my chart are also scaled to sample size, so some points are large, some are small. I have figured out everything I need using the plot() function: how to plot the points, scale them by sample size, weight the linear

[R] first-order integer valued autoregressive process, inar(1)

2010-11-15 Thread sahin
Hello, in my doctoral thesis i try to model time series crash count data with an inar(1)-process, but i have a few problems in writing the r-code. is there someone, who works with inar-processes. i would be very grateful, if someone gives me some ideas in writing the code. nazli

Re: [R] R error using Survr function with gcmrec

2010-11-15 Thread Emily C
I've solved the condition problem, but have come across another one with the gcmrec function and was wondering if anyone could point me in the right direction again? After running the code below, I get this error message: Error in gcmrec(Survr(id, time, event) ~ var, data = dataOK, s = 1096) :

[R] Re : interpretation of coefficients in survreg AND obtaining the hazard function

2010-11-15 Thread Biau David
Dear Prof Therneau, thank yo for this information: this is going to be most useful for what I want to do. I will look into the ACF model. Yours, David Biau. De : Terry Therneau thern...@mayo.edu Cc : r-help@r-project.org Envoyé le : Lun 15 novembre 2010,

Re: [R] Force evaluation of variable when calling partialPlot

2010-11-15 Thread gdillon
RE: the folloing original question: I'm using the randomForest package and would like to generate partial dependence plots, one after another, for a variety of variables: m - randomForest( s, ... ) varnames - c( var1, var2, var3, var4 ) # var1..4 are all in data frame s for( v in

Re: [R] Problem in installing and starting Rattle

2010-11-15 Thread Graham Williams
On 16 November 2010 02:40, Feng Mai maif...@gmail.com wrote: I also have the problem trying to start rattle Windows 7 32-bit R 2.12.0 When I try library(rattle) I get an error message The procedure entry point deflateSetHeader could not be located in the dynamic link library zilb1.dll I

[R] Defining functions inside loops

2010-11-15 Thread Eduardo de Oliveira Horta
Hello, I was trying to define a set of functions inside a loop, with the loop index working as a parameter for each function. Below I post a simpler example, as to illustrate what I was intending: f-list() for (i in 1:10){ f[[i]]-function(t){ f[[i]]-t^2+i } } rm(i) With that, I was

Re: [R] Need help with pointLabels()

2010-11-15 Thread Greg Snow
What package is pointLabel (or is it pointLabels) in? giving a reproducible example includes stating packages other than the standard ones. What you are trying to do is not simple for general cases, some tools work better on some datasets, but others work better on other datasets. Some other

Re: [R] Non-positive definite cross-covariance matrices

2010-11-15 Thread Giovanni Petris
What made you think that a cross-covariance matrix should be positive definite? Id does not even need to be a square matrix, or symmetric. Giovanni Petris On Mon, 2010-11-15 at 12:58 -0500, Jeff Bassett wrote: I am creating covariance matrices from sets of points, and I am having frequent

Re: [R] Defining functions inside loops

2010-11-15 Thread Greg Snow
This is a side effect of the lazy evaluation done in functions. Look at the help page for the force function for more details and how to force evaluation and solve your problem. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111

Re: [R] Need help with pointLabels()

2010-11-15 Thread Craig Starger
Sorry, pointLabel() is in the package maptools: http://rgm2.lab.nig.ac.jp/RGM2/R_man-2.9.0/library/maptools/man/pointLabel.html Thank you for the tips on the other packages, I will give it a try. -C On Mon, Nov 15, 2010 at 3:54 PM, Greg Snow greg.s...@imail.org wrote: What package is

Re: [R] Defining functions inside loops

2010-11-15 Thread William Dunlap
You could make f[[i]] be function(t)t^2+i for i in 1:10 with f - lapply(1:10, function(i)local({ force(i) ; function(x)x^2+i})) After that we get the correct results f[[7]](100:103) [1] 10007 10208 10411 10616 but looking at the function doesn't immdiately tell you what 'i' is in the

Re: [R] Help with Hist

2010-11-15 Thread Steve Sidney
Hi Ivan / Dieter Thanks for your assistance, I will try the suggestions. The plotrix solution seems like the more elegant solution, except that unless I missing something I will land up with a value based graph rather than a density based one, which is what I really wanted. It seems like

Re: [R] Need help with pointLabels()

2010-11-15 Thread Joshua Wiley
Hi Craig, As Greg pointed out, choose optimal locations for labels is tricky (side note for anyone reading pointLabel() comes from the maptools package). Inferring from your code, the labels you are plotting are the Category each point belongs to which suggests there may not be a huge amount of

[R] indexing lists

2010-11-15 Thread Chris Carleton
Hi List, I'm trying to work out how to use which(), or another function, to find the top-level index of a list item based on a condition. An example will clarify my question. a - list(c(1,2),c(3,4)) a [[1]] [1] 1 2 [[2]] [1] 3 4 I want to find the top level index of c(1,2), which should return

Re: [R] Defining functions inside loops

2010-11-15 Thread Eduardo de Oliveira Horta
Thanks a lot for your readiness! Problem (apparently) solved! Best regards, Eduardo Horta On Mon, Nov 15, 2010 at 7:10 PM, William Dunlap wdun...@tibco.com wrote: You could make f[[i]] be function(t)t^2+i for i in 1:10 with f - lapply(1:10, function(i)local({ force(i) ;

Re: [R] indexing lists

2010-11-15 Thread Erik Iverson
Chris, Well, the 'answer' could be: which(sapply(a, function(x) all(x == c(1,2 But I wonder how these elements of 'a' in your actual application are coming to be? If you're constructing them, you can give the elements of the list names, and then it doesn't matter what numerical index they

Re: [R] indexing lists

2010-11-15 Thread Joshua Wiley
Hi Chris, Does this do what you're after? It just compares each element of a (i.e., a[[1]] and a[[2]]) to c(1, 2) and determines if they are identical or not. which(sapply(a, identical, y = c(1, 2))) There were too many 1s floating around for me to figure out if you wanted to find elements of

Re: [R] Defining functions inside loops

2010-11-15 Thread Duncan Murdoch
On 15/11/2010 4:10 PM, William Dunlap wrote: You could make f[[i]] be function(t)t^2+i for i in 1:10 with f- lapply(1:10, function(i)local({ force(i) ; function(x)x^2+i})) After that we get the correct results f[[7]](100:103) [1] 10007 10208 10411 10616 but looking at the

[R] How to plot effect of x1 while controlling for x2

2010-11-15 Thread Mark Na
Hello R-helpers, Please see a self-contained example below, in which I attempt to plot the effect of x1 on y, while controlling for x2. Is there a function that does the same thing, without having to specify that x2 should be held at its mean value? It works fine for this simple example, but

[R] Executing Command on Multiple R Objects

2010-11-15 Thread patze003
Hello Everyone - I want to print a number of results from lme function objects out to a txt file. How could I do this more efficiently than what you see here: out2 - capture.output(summary(mod2a)) out3 - capture.output(summary(mod3)) out4 - capture.output(summary(mod5)) out5 -

Re: [R] indexing lists

2010-11-15 Thread David Winsemius
On Nov 15, 2010, at 4:24 PM, Chris Carleton wrote: Hi List, I'm trying to work out how to use which(), or another function, to find the top-level index of a list item based on a condition. An example will clarify my question. a - list(c(1,2),c(3,4)) a [[1]] [1] 1 2 [[2]] [1] 3 4 I

[R] hclust, does order of data matter?

2010-11-15 Thread rchowdhury
Hello, I am using the hclust function to cluster some data. I have two separate files with the same data. The only difference is the order of the data in the file. For some reason, when I run the two files through the hclust function, I get two completely different results. Does anyone know

  1   2   >