Re: [R] Cannot install packages in R 2.12.0 on Windows 7

2010-11-15 Thread Prof Brian Ripley
The error seems to be a BioC problem[*] and associated with having a package installed with an empty DESCRIPTION file. So please take a look at your installed packages and remove any such. The following R code may help: for(lib in .libPaths()) { descs <- Sys.glob(file.path(lib, "*", "DESC

Re: [R] About upgrade R

2010-11-15 Thread Tal Galili
Hello Cesar, Thank you for the reply. Another question I have is if it is possible to detect the library path of an old R install, from the terminal of the new R install. Cheers, Tal Contact Details:--- Contact me: tal.gal...@g

[R] Aligning points and boxes in legend

2010-11-15 Thread mark wallace
Hi list, I have been trying to create a legend for a plot that includes polygons, lines, and points. I've included an example below. I have two problems with this legend. 1. I can't seem to change the colour of the box that represents the polygon in the legend. 2. The boxes and points in the lege

Re: [R] Batch Processing Files

2010-11-15 Thread Dennis Murphy
Hi: See inline. On Mon, Nov 15, 2010 at 4:26 PM, Nate Miller wrote: > Hi All! > > I have some experience with R, but less experience writing scripts using > R and have run into a challenge that I hope someone can help me with. > > I have multiple .csv files of data each with the same 3 columns

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

2010-11-15 Thread Seth Falcon
Hi Anthony, On Mon, Nov 15, 2010 at 7:07 AM, Anthony Damico 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 something >

[R] AOV/LME

2010-11-15 Thread janesense
Hi everyone, I'm having a little trouble with working out what formula is better to use for a repeated measures two way anova. I have two factors, L (five levels) and T (two levels). L and T are both crossed factors (all participants do all combinations). So, I do: summary(aov(dat~L*T+Error(

[R] Debugging segfault in foreach

2010-11-15 Thread Steve Lianoglou
Hi, I'm using R-2.12 on a linux 64bit machine. When I run a chunk of code inside a foreach() %do% { ...} or %dopar% {...} (with doMC backend) I keep getting a segfault. Running the *same* code within lapply(something, function(x) ... ) doesn't result in any segfaults. I'll paste the output below,

Re: [R] Proportional hazard model with weibull baseline hazard

2010-11-15 Thread Dennis Murphy
Hi: Perhaps this post from earlier today will be useful: http://r.789695.n4.nabble.com/Re-interpretation-of-coefficients-in-survreg-AND-obtaining-the-hazard-function-td3043160.html#a3043160 HTH, Dennis 2010/11/15 Lorena Avendaño > Dear R-users, > > I would like to fit a fully parametric propor

Re: [R] indexing lists

2010-11-15 Thread David Winsemius
On Nov 15, 2010, at 7:58 PM, Chris Carleton wrote: Thanks for the suggestions, but 'cat' is not causing name space conflicts for me install.packages( library(fortunes) fortune("dog") and since I'm not packaging the code for anyone else to use, I'm less than concerned about potential confl

Re: [R] Sampling problem

2010-11-15 Thread Michael Bedward
Hello, Is this what you want ? sampleX <- function(X, nGrp1, nsamples) # X is matrix or data.frame with cols for two groups of variables # with grp1 in cols 2:5 and grp2 in cols 6:9 # # nGrp1 <- number of variables to sample from group 1 # # nsamples <- number of rows in output matrix if (nGrp

Re: [R] indexing lists

2010-11-15 Thread Chris Carleton
Thanks for the suggestions, but 'cat' is not causing name space conflicts for me and since I'm not packaging the code for anyone else to use, I'm less than concerned about potential conflicts. I did type that too quickly, and I have resolved my problem using a workaround that does not involve findi

Re: [R] Integrating functions / vector arithmetic

2010-11-15 Thread Eduardo de Oliveira Horta
Thanks! Seems to work just fine! Best regards, Eduardo Horta On Mon, Nov 15, 2010 at 10:37 PM, David Winsemius wrote: > > On Nov 15, 2010, at 7:18 PM, Eduardo de Oliveira Horta wrote: > > Hello, >> >> I was trying to build some functions which I would like to integrate over >> an >> interval u

Re: [R] Integrating functions / vector arithmetic

2010-11-15 Thread David Winsemius
On Nov 15, 2010, at 7:18 PM, Eduardo de Oliveira Horta wrote: Hello, I was trying to build some functions which I would like to integrate over an interval using the function 'integrate' from the 'stats' package. As an example, please consider the function h(u)=sin(pi*u) + sqrt(2)*sin(pi*

[R] Batch Processing Files

2010-11-15 Thread Nate Miller
Hi All! I have some experience with R, but less experience writing scripts using R and have run into a challenge that I hope someone can help me with. I have multiple .csv files of data each with the same 3 columns of data, but potentially of varying lengths (some data files are from short m

[R] Aggregate on identical link attributes

2010-11-15 Thread LCOG1
Hello R community, I need to do some aggregation based on the test data below. The below code works ok, but when its applied to my real data which includes over 9,000 records the process runs for over an hour. I know there is a more efficient way of doing this. I want to Sum the below data'

Re: [R] Bootstrap error message: Error in statistic(data, origina l, ...) : unused argument(s) ( ...) [Broadcast]

2010-11-15 Thread German
Hey everybody. I found the solution to the problem - at least for univariate statistics. In order to use the bootstrap method for an arbitrary statistic, the syntax for the function has to be in the form: Given a univariate formula with argument 'x': myfunction <- function(x,p){formula(x[p])}

Re: [R] About upgrade R

2010-11-15 Thread csrabak
Em 14/11/2010 20:42, csrabak escreveu: Em 14/11/2010 18:24, Tal Galili escreveu: Hi John, thank you for that input. It could be that the code I wrote here: http://www.r-statistics.com/2010/04/changing-your-r-upgrading-strategy-and-the-r-code-to-do-it-on-windows/ Should be updated so every time

[R] Integrating functions / vector arithmetic

2010-11-15 Thread Eduardo de Oliveira Horta
Hello, I was trying to build some functions which I would like to integrate over an interval using the function 'integrate' from the 'stats' package. As an example, please consider the function h(u)=sin(pi*u) + sqrt(2)*sin(pi*2*u) + sqrt(3)*sin(pi*3*u) + 2*sin(pi*4*u) Two alternative ways to 'bu

Re: [R] Zero truncated Poisson distribution & R2WinBUGS

2010-11-15 Thread Ben Bolker
julien martin gmail.com> writes: > (2) The second part of the script calls WinBUGS and run the binomial > mixture models on the count data. In this case the count matrix y was > converted to a vector C1 before being passed over to BUGS > Any idea how to create a zero truncated Poisson for paramet

Re: [R] Converting numbers to percentages for boxplots

2010-11-15 Thread David Winsemius
On Nov 15, 2010, at 5:33 PM, daniel carawan wrote: Hi, I need to convert general numbers to percentages in R to create a boxplot for purposes of comparison. Can you please tell me how I can do that? My data is attached as a csv file. No, it's not. Please read the Posting Guide. (.csv is

Re: [R] comparing levels of aggregation with negative binomial models

2010-11-15 Thread Ben Bolker
Ben Raymond rhul.ac.uk> writes: > > 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 t

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

2010-11-15 Thread Bert Gunter
... and/or perhaps ?coplot in base R graphics or ?xyplot in trellis. -- Bert Gunter On Mon, Nov 15, 2010 at 2:25 PM, Greg Snow wrote: > Look at Predict.Plot (and TkPredict) from the TeachingDemos package. > > -- > Gregory (Greg) L. Snow Ph.D. > Statistical Data Center > Intermountain Healthcare

Re: [R] indexing lists

2010-11-15 Thread David Winsemius
On Nov 15, 2010, at 5:07 PM, Chris Carleton wrote: Thanks for the suggestions. The issue for me is that the top level index is also like a database key so it might be a bit annoying to coerce it to char() so that I can reference it with a $ and then I would have to still be able to find out

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 1:28 PM, Anthony Damico wrote: > 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 stru

Re: [R] hclust, does order of data matter?

2010-11-15 Thread Peter Langfelder
On Mon, Nov 15, 2010 at 2:19 PM, Reshmi Chowdhury wrote: > Here is the code I am using: > > m <- read.csv("data_unsorted.csv",header=TRUE) > m <- na.omit(m) > cs <- hclust(dist(t(m),method="euclidean"),method="complete") > ds <- as.dendrogram(cs) As Christian said, you may want to plot the cs tre

[R] Converting numbers to percentages for boxplots

2010-11-15 Thread daniel carawan
Hi, I need to convert general numbers to percentages in R to create a boxplot for purposes of comparison. Can you please tell me how I can do that? My data is attached as a csv file. Thanks. Daniel __ R-help@r-project.org mailing list https://stat.e

Re: [R] indexing lists

2010-11-15 Thread Chris Carleton
Thanks for the suggestions. The issue for me is that the top level index is also like a database key so it might be a bit annoying to coerce it to char() so that I can reference it with a $ and then I would have to still be able to find out what the name was automatically. I've got a function right

[R] Proportional hazard model with weibull baseline hazard

2010-11-15 Thread Lorena Avendaño
Dear R-users, I would like to fit a fully parametric proportional hazard model with a weibull baseline hazard and a logit link function. This is, the hazard function is: lambda_i (t) = lambda_0 (t) psi (x_i* beta) where lambda_0 is a weibull distribution and psi a logistic distribution. Does some

[R] Sampling problem

2010-11-15 Thread wangwallace
Hey, I am hoping someone can help me with a sampling question. I have a data frame of 8 variables (the first column is the subjects' id): SubIDCSE1 CSE2 CSE3 CSE4 WSE1 WSE2 WSE3 WSE4 1 6 5 6 2 6 22 4 2 6 4

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

2010-11-15 Thread Greg Snow
Look at Predict.Plot (and TkPredict) from the TeachingDemos package. -- 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 Be

Re: [R] rotate column names in large matrix

2010-11-15 Thread Chris Stubben
You could display the matrix as an image then add column names (rotated used srt) if you really want them. x <- cor(matrix(rnorm(600), 60, 100)) # set margins with extra space at top and xpd=TRUE to write outside plot region op<-par(mar=c(1,1,5,1), xpd=TRUE) # display image without the 90 de

Re: [R] hclust, does order of data matter?

2010-11-15 Thread Reshmi Chowdhury
Here is the code I am using: m <- read.csv("data_unsorted.csv",header=TRUE) m <- na.omit(m) cs <- hclust(dist(t(m),method="euclidean"),method="complete") ds <- as.dendrogram(cs) In this case, m is a 106x40 matrix of doubles. When I change the order of the columns, I get different results... Tha

Re: [R] hclust, does order of data matter?

2010-11-15 Thread Christian Hennig
I don't know how the hclust function is implemented, but generally in hierarchical clustering the result can be ambiguous if there are several distances of identical value in the dataset (or identical between-cluster distances occur when aggregating clusters). The role of the order of the data

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

2010-11-15 Thread Joshua Wiley
Hi Mark, If the cumbersome part is that you have to create new data to use predict, then I think the answer is "no", there is not an easier way. However, we can consider easy ways to make new data that fit with certain constraints (e.g., variables = their mean). Here's an example: ## original d

Re: [R] hclust, does order of data matter?

2010-11-15 Thread Peter Langfelder
On Mon, Nov 15, 2010 at 2:07 PM, rchowdhury wrote: > > 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 > funct

[R] Cannot install packages in R 2.12.0 on Windows 7

2010-11-15 Thread Dick Beyer
Hi, I am unable to install packages on my R 2.12.0 Windows 7 machine. Here are the relevant lines: sessionInfo() R version 2.12.0 (2010-10-15) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_

Re: [R] Executing Command on Multiple R Objects

2010-11-15 Thread David Winsemius
On Nov 15, 2010, at 4:43 PM, patze003 wrote: 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 <-

[R] Fwd: indexing lists

2010-11-15 Thread Chris Carleton
Sorry folks, I keep forgetting to switch to my r-help email to send the replies so they get unintentionally sent to a moderator (particularly sorry for that moderators...) C -- Forwarded message -- From: Chris Carleton Date: 15 November 2010 17:07 Subject: Re: [R] indexing lists

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

2010-11-15 Thread Lee Hachadoorian
On Mon, 15 Nov 2010 13:28:40 -0500, Anthony Damico wrote: > Do you have any other ideas as to how I might diagnose what's going on > here? Or, alternatively, is there some workaround that would get this giant > CSV into a database? If you think there's a reasonable way to use the > IMPORT comman

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

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 wan

[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 <- capture.outp

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

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 func

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 a

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

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

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 the

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 th

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 wrote: > What package is pointLabel (or is it p

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

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 t

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

Re: [R] Problem in installing and starting Rattle

2010-11-15 Thread Graham Williams
On 16 November 2010 02:40, Feng Mai 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 hit OK

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 >

[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 Cc : r-help@r-project.org Envoyé le : Lun 15 novembre 2010, 15h 33min 23s Obje

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) : N

[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

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

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 throu

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] 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] 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] 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 sqldf("sele

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

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

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

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

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 wrote: > On 15/11/2010 6:22 AM, Dieter Menne wro

[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. stats:::plot.dendrogram

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 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 ss09pusa as

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 a

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 rep

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

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 co

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] Fetching data

2010-11-15 Thread Barry Rowlingson
On Mon, Nov 15, 2010 at 3:46 PM, Feng Mai 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 behind the scen

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 wrote: > > 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 ,21

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

[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] 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 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 foo2 more > indicated? Or

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(

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

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 this

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 wrote: > Hello, > > > > thanks for answ

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 "http://www.ncdex.com/Market_Data/Spot_pric

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

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 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 something > obvious here

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

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 g

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

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 Files\R\R-2.12.0patc

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 Sender: r-help-boun...@r-project.org Date: Mon, 15 Nov 2010 16:08:47 To

Re: [R] Help with Hist

2010-11-15 Thread Ben Bolker
Steve Sidney 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 an outl

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 th

  1   2   >