Re: [R] Normalizing plot tick values

2010-05-17 Thread rajesh j
Hi, I've solved the problem. This command works axis(1,at=axTicks(1),label = axTicks(1)/100); Thanks for your help ~Rajesh On Mon, May 17, 2010 at 9:55 AM, rajesh j akshay.raj...@gmail.com wrote: Hi, I tried using this in my plot and I get an error saying 'at' and 'labels' lengths differ, 8

Re: [R] sample

2010-05-17 Thread Wu Gong
I tried cbind, it works. moms-read.delim(females.txt, sep = ,stringsAsFactors=FALSE,header=TRUE) dads-read.delim(males.txt, sep = ,stringsAsFactors=FALSE,header=TRUE) output_offspring - cbind(moms[,c(1,sample((2:5),2))],dads[sample(nrow(dads),nrow(moms),replace=TRUE),c(1,sample((2:5),2))])

Re: [R] Agreement

2010-05-17 Thread Gregoire Thomas
Hi Tobias, Yes, epiR and irr provide respectively CCC and ICC, but I could not find any implementation of the total deviation index. I might just implement Lin's code. Met vriendelijke groeten, Gregoire From: r-help-boun...@r-project.org

Re: [R] Splines under tension

2010-05-17 Thread David Winsemius
On May 16, 2010, at 1:12 PM, sam.e wrote: Thank you for the helpful direction to the smoothing splines function, it was very helpful and is exactly what i am trying to do. My data however is 3-D, i.e. i have x and y values which are coordinates for different field sites and z values

[R] Help with heatmap

2010-05-17 Thread Meng Wu
HI, I am trying to create a heatmap with 24 samples with 15672 varibles, I read in the table in R, and then made it as a matrix, then try to create the heatmap using heatmap(x,...) However, I received the error message as: heatmap(t(x)) Error: cannot allocate vector of size 936.8 Mb

[R] problems with generation of quantiles under For ()

2010-05-17 Thread M. (AMFOR)
Dear, I want to make an application to calculate quantile within a For() I tried the following without success: ej. date p_val - matrix(sample(10, 1000, replace=TRUE), 200,5) test 1 rr - paste(p_val$,names(p_val[1]), sep=) quant - quantile(rr, probs = c(0, 10, 20, 30, 40, 50, 60, 70, 80,

Re: [R] Compiling R with --enable-R-shlib for rpy2 error

2010-05-17 Thread Padma TAN
Hi, Thanks! :) I'll install the newer version of R. However do I have to recompile all the modules that I did for my previous version of R? Regards, Padma Tan Genome Institute of Singapore 60 Biopolis Street, Genome #02-01 Singapore 138672 DID : 6478 8671 Fax : 6478 9058 email:

[R] Running gplots package with Windows 7

2010-05-17 Thread agusdon
Hello, I'm fairly new to R and am running version 2.11.0 with Windows 7. I need to run the package gplots. The package installs fine, but when I try to load it I receive the message: Loading required package: gtools Error: package 'gtools' could not be loaded In addition: Warning message:

[R] Problem with ldply

2010-05-17 Thread cfriedl
I've examining a number of linear regression models on a large dataset following the basic ideas presented here http://www.r-bloggers.com/r-calculating-all-possible-linear-regression-models-for-a-given-set-of-predictors/ Calculating all possible linear regressions . I run into a problem with

[R] pgmm function

2010-05-17 Thread 杜立民
Dear everyone, I try to regress a dynamic panel model with pgmm function in the plm package, but it doesn't work. The error report is Error in names(coefficients) - c(namesX, namest) : 'names' attribute [13] must be the same length as the vector [5]. My command is:

[R] a question about beadarray in R

2010-05-17 Thread shizhu zang
Hi,   When I check the beadarray in R, I found the following information:   package.version(beadarray) [1] 1.16.0 library(beadarray) Error in library.dynam(lib, package, package.lib) : Cannot find sharing library (beadarray)   Does anybody know what I can do for this problem?   Thanks a lot!  

Re: [R] rcorr p-values for pearson's correlation coefficients

2010-05-17 Thread Bryan Yu
Amit amitkumartiwary at gmail.com writes: Hi! All, To find co-expressed genes from a expression matrix of dimension (9275 X 569), I used rcorr function from library(Hmisc) to calculate pearson The code itself is correct. I have tried it on my computer. About the Pvalue, FDR may be

[R] applying quantile to a list using values of another object as probs

2010-05-17 Thread Lorenzo Cattarino
Hi r-users, I have a matrix B and a list of 3x3 matrices (mylist). I want to calculate the quantiles in the list using each of the value of B as probabilities. The codes I wrote are: B - matrix (runif(12, 0, 1), 3, 4) mylist - lapply(mylist, function(x) {matrix (rnorm(9), 3, 3)}) for

Re: [R] Running gplots package with Windows 7

2010-05-17 Thread Henrik Bengtsson
I won't have an answer but it will help others to help you if you also report what the following gives: library(gtools); print(sessionInfo()); and print(packageDescription(gtools)); My $.02 Henrik On Mon, May 17, 2010 at 4:01 AM, agusdon agus...@gmail.com wrote: Hello, I'm fairly new to

Re: [R] Running gplots package with Windows 7

2010-05-17 Thread Uwe Ligges
Additionally, please give the full output that let you assume The package installs fine... Uwe Ligges On 17.05.2010 10:18, Henrik Bengtsson wrote: I won't have an answer but it will help others to help you if you also report what the following gives: library(gtools); print(sessionInfo());

Re: [R] Compiling R with --enable-R-shlib for rpy2 error

2010-05-17 Thread Uwe Ligges
On 17.05.2010 05:22, Padma TAN wrote: Hi, Thanks! :) I'll install the newer version of R. However do I have to recompile all the modules that I did for my previous version of R? If you use the same library (or a copy of it) you used for packages under the old R version, then

[R] Dynamically build variable names

2010-05-17 Thread Stefan Petersson
I'm trying to dynamically build variable names to use on a list. Let's say I have a list like this one: l - list(V1_1=c(1,2,3), V1_2=c('One','Two','Three')) And I succesfully build my variable name like this: paste('l$', 'V1_1', sep='') Why can't I just run a mean call with the pasted

[R] Loess fit

2010-05-17 Thread Chintanu
Hi, I wonder why my attempt to extend an existing loess fit to a new data set is producing error. I was trying the following: dat = read.csv(choose.files()) x = dat[,2]; y = dat[,1] x.sort = sort(x) y.loess = loess(y~x, span=0.75) # For testing the above fit with a new dataset: test =

Re: [R] Dynamically build variable names

2010-05-17 Thread Stefan Petersson
I'm trying to dynamically build variable names to use on a list. Let's say I have a list like this one: l - list(V1_1=c(1,2,3), V1_2=c('One','Two','Three')) And I succesfully build my variable name like this: paste('l$', 'V1_1', sep='') Why can't I just run a mean call with the

Re: [R] Dynamically build variable names

2010-05-17 Thread jim holtman
library(fortunes) fortune('parse') If the answer is parse() you should usually rethink the question. -- Thomas Lumley R-help (February 2005) On Mon, May 17, 2010 at 5:08 AM, Stefan Petersson stefan.peters...@inizio.se wrote: I'm trying to dynamically build variable names to

Re: [R] Dynamically build variable names

2010-05-17 Thread jim holtman
?'[[' What I think you want is: x - V1_1 mean(l[[x]]) Also you need to look at 'get'. On Mon, May 17, 2010 at 4:41 AM, Stefan Petersson stefan.peters...@inizio.se wrote: I'm trying to dynamically build variable names to use on a list. Let's say I have a list like this one: l -

Re: [R] Dynamically build variable names

2010-05-17 Thread Henrik Bengtsson
On Mon, May 17, 2010 at 11:12 AM, jim holtman jholt...@gmail.com wrote: ?'[[' What I think you want is: x - V1_1 mean(l[[x]]) Also you need to look at 'get'. ...and if the answer is get() or assign() you should usually consider library(fortunes); fortune(rethink the question); /Henrik

[R] (no subject)

2010-05-17 Thread Millo Giovanni
Dear Limin, might be just about anything. Could you please provide a reproducible example? Best, Giovanni - Original message -- Message: 51 Date: Mon, 17 May 2010 10:36:03 +0800 (CST) From: ??? dlm...@163.com To: r-help@r-project.org Subject: [R] pgmm

Re: [R] applying quantile to a list using values of another object as probs

2010-05-17 Thread Jim Lemon
On 05/17/2010 06:01 PM, Lorenzo Cattarino wrote: Hi r-users, I have a matrix B and a list of 3x3 matrices (mylist). I want to calculate the quantiles in the list using each of the value of B as probabilities. The codes I wrote are: B- matrix (runif(12, 0, 1), 3, 4) mylist- lapply(mylist,

Re: [R] What does this warning mean: DLL attempted to change FPU control word from 8001f to 9001f

2010-05-17 Thread S Ellison
There's a note on this issue at http://www.nag.co.uk/numeric/RunderWindows.asp which claims it can 'safely be ignored'. Your mileage may vary, I presume. I had the same error message under a previous version (but with a different library and during installation, not loading, some packages)

[R] Query on linear mixed model

2010-05-17 Thread Vijayan Padmanabhan
Hi R Forum I am a newbie to R and I have been amazed by what I can get my team to accomplish just by implementing Scripting routines of R in all my team's areas of interest.. Recently i have been trying to adopt R scripting routine for some analysis with longitudanal data.. I am presenting my R

Re: [R] a question about beadarray in R

2010-05-17 Thread Martin Morgan
On 05/16/2010 11:20 PM, shizhu zang wrote: Hi, When I check the beadarray in R, I found the following information: package.version(beadarray) [1] 1.16.0 library(beadarray) Error in library.dynam(lib, package, package.lib) : Cannot find sharing library (beadarray) Does anybody

[R] packages on R 2.11

2010-05-17 Thread Ivan Calandra
Dear users, I've noticed some time ago that some of the packages I use (especially doBy) could not run (yet) on R 2.11. So I kept on using R 2.10. But I think it should be fine by now. So my question is how do I check whether a package is compatible with the last version of R? How can I

[R] To correct an error message

2010-05-17 Thread Moohwan Kim
Dear R Family, I have an error message. I would like to learn how to deal with that. The orginal series is as follows: I just pick up the first 10 observations. dif_transaud[1:10] [1] 0.0065880493 -0.0065880490 -0.0131743570 0.0197745715 0.0065889175 [6] 0.0131813110 0.0065923924

Re: [R] problems with generation of quantiles under For ()

2010-05-17 Thread David Winsemius
On May 16, 2010, at 6:16 PM, Agustín Muñoz M. (AMFOR) wrote: Dear, I want to make an application to calculate quantile within a For() I tried the following without success: ej. date p_val - matrix(sample(10, 1000, replace=TRUE), 200,5) test 1 rr - paste(p_val$,names(p_val[1]), sep=)

Re: [R] What does this warning mean: DLL attempted to change FPU control word from 8001f to 9001f

2010-05-17 Thread Duncan Murdoch
On 17/05/2010 6:58 AM, S Ellison wrote: There's a note on this issue at http://www.nag.co.uk/numeric/RunderWindows.asp which claims it can 'safely be ignored'. That's very specific to NAG. The quote continues: Only one of the NAG routines uses a different FPU control word and this

[R] Change order of columns in table?

2010-05-17 Thread someone
I'm an R noob and have a (maybe) stupid question... I have a table where I have the weekdays and a number for each weekday of entries: Thats what the table looks like... Now I want to have an pie3D plot of this, but obviously the order of the weekdays are not as one would expect... Friday

Re: [R] Problem with ldply

2010-05-17 Thread Ista Zahn
The probem is that in the case of model 2 the standard error terms reduce to a vector of length one. Since subsetting with '[' drops unneeded dimensions by default, this vector loses it's name. The solution is to add 'drop = FALSE' to your subset call, like this ldply(fits, function(x)

Re: [R] Loess fit

2010-05-17 Thread David Winsemius
On May 17, 2010, at 4:47 AM, Chintanu wrote: Hi, I wonder why my attempt to extend an existing loess fit to a new data set is producing error. I was trying the following: dat = read.csv(choose.files()) x = dat[,2]; y = dat[,1] x.sort = sort(x) That is not needed, furthermore, you don't

Re: [R] packages on R 2.11

2010-05-17 Thread David Winsemius
On May 17, 2010, at 8:07 AM, Ivan Calandra wrote: Dear users, I've noticed some time ago that some of the packages I use (especially doBy) could not run (yet) on R 2.11. So I kept on using R 2.10. But I think it should be fine by now. So my question is how do I check whether a package

[R] Help

2010-05-17 Thread APOLLOCHEROKEE
Dear Sir or Madam:Hi,sorry for disturbing you. Currently, I'm a master student, and my lecturer didn't teach us anything about how to use R. But the assignment is all about R. So even a very stupid error,I still can't tell. So please forgive my innocence. The following is the

[R] retrieving last R output

2010-05-17 Thread math_daddy
Hello. I ran a simulation that took a few days to complete, and want to analyze the results, but have just realized that I (idiotically) did not assign the output to a variable when I intitiated the simulation. Is there any way to retrieve the last output produced by R so that these last few

[R] looking for Variable selections models, techniques, methods

2010-05-17 Thread mauede
We still have a long way to go with the data we were given by some drug discovery scientists. The problem is to select the few variables (Collective Variables), from a set of variables sampled during a Molecular Dynamics simulation, which exhibit a consistent and coherent relationship with

Re: [R] To correct an error message

2010-05-17 Thread David Winsemius
On May 17, 2010, at 8:22 AM, Moohwan Kim wrote: Dear R Family, I have an error message. I would like to learn how to deal with that. The orginal series is as follows: I just pick up the first 10 observations. [1:10] [1] 0.0065880493 -0.0065880490 -0.0131743570 0.0197745715

Re: [R] retrieving last R output

2010-05-17 Thread Henrique Dallazuanna
See .Last.value On Mon, May 17, 2010 at 10:07 AM, math_daddy math_da...@hotmail.com wrote: Hello. I ran a simulation that took a few days to complete, and want to analyze the results, but have just realized that I (idiotically) did not assign the output to a variable when I intitiated

Re: [R] retrieving last R output

2010-05-17 Thread baptiste auguie
Hi, Try this, saveMyWork - .Last.value HTH, baptiste On 17 May 2010 15:07, math_daddy math_da...@hotmail.com wrote: Hello. I ran a simulation that took a few days to complete, and want to analyze the results, but have just realized that I (idiotically) did not assign the output to a

[R] Help with RandomForest

2010-05-17 Thread Steve_Friedman
I'm working with the randomForest package and have successfully build a model. I'd like to go one step further however, and use the output from the model to construct a map using the output. My input data are spatial, and I have an independent set of rasterize maps for each of the predictor

Re: [R] packages on R 2.11

2010-05-17 Thread Ivan Calandra
Thank you David! Le 5/17/2010 15:10, David Winsemius a écrit : On May 17, 2010, at 8:07 AM, Ivan Calandra wrote: Dear users, I've noticed some time ago that some of the packages I use (especially doBy) could not run (yet) on R 2.11. So I kept on using R 2.10. But I think it should be

Re: [R] Help

2010-05-17 Thread Duncan Murdoch
On 17/05/2010 9:07 AM, APOLLOCHEROKEE wrote: Dear Sir or Madam:Hi,sorry for disturbing you. Currently, I'm a master student, and my lecturer didn't teach us anything about how to use R. But the assignment is all about R. So even a very stupid error,I still can't tell. So please

Re: [R] Help

2010-05-17 Thread David Winsemius
Please read the Posting Guide. Several of your questions will get answered, including why the attachment did not arrive at any of out mail clients. We are having some difficulty understanding why you say your lecturer didn't teach us anything about how to use R. It appears from the

Re: [R] improvement

2010-05-17 Thread Sebastian Kruk
For example if nombreC - nombreC - c(Juan, Carlos, Ana, María,Mario) I do not want as a result: name index 1 Juan 1 2 Juan 5 3 Carlos 2 4Ana 3 5 María 4 6 Mario 0 I want: name index 1 Juan 1 2 Juan 5 3 Carlos 2 4Ana 3 5 María

Re: [R] Help with RandomForest

2010-05-17 Thread Liaw, Andy
Steve, It sounds to me like you want to use the model to predict data in other maps. If so, you should be using predict(), not getTree(). getTree() shows the classification rules in _one_ of the trees in the forest (default the first tree), which is rarely of interest if you've grown hundreds

Re: [R] Loess fit

2010-05-17 Thread Liaw, Andy
I'm just guessing (since as David pointed out, no reproducible example were given), but this perhaps could be the problem: R x - 1:10 R y - rnorm(x) R fm - loess(y ~ x) R predict(fm, data.frame(x=5:15)) [1] 0.1830450 0.2145826 -0.2158466 -0.3051978 -0.2635318 -0.1013985 [7] NA

[R] R interface for blind users: Summary

2010-05-17 Thread Rainer Scheuchenpflug
Dear R-help, just for the record a summary of responses to my problem: On 04/05/2010 9:41 AM, Rainer Scheuchenpflug wrote: a student of mine tries to use the Windows-Rconsole with screen reading software (she is blind), and cannot access the command line (Menus are ok). - Duncan Murdoch

Re: [R] Change order of columns in table?

2010-05-17 Thread Thomas Stewart
7 data points? What's wrong with with doing it manually? x-c(173,193,194,167,119,80,96) labs-c(Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday) pie3D(x,labels=labs) -tgs On Mon, May 17, 2010 at 8:46 AM, someone vonhof...@t-online.de wrote: I'm an R noob and have a (maybe) stupid

[R] Text positioning in pixel coordinates?

2010-05-17 Thread Oliver
Hello, the positioning of text elements in a graphics is nortmally done via x/y coordin ates of the displayed data. most of the time this is very helpful (and missing in other programs). But when I want to set some text into a graphics always at the same position, this will not be easy... I

Re: [R] Change order of columns in table?

2010-05-17 Thread someone
well, actually the script is run by crone job once in a while and id hate to do things manually... -- View this message in context: http://r.789695.n4.nabble.com/Change-order-of-columns-in-table-tp2219536p2219725.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Change order of columns in table?

2010-05-17 Thread David Winsemius
On May 17, 2010, at 10:31 AM, someone wrote: well, actually the script is run by crone job once in a while and id hate to do things manually... The order of levels of a factor variable variable can be changed with a call along the lines of fac - factor(fac, levels=c(Monday, Tuesday,

Re: [R] Robust SE Heteroskedasticity-consistent estimation

2010-05-17 Thread Arne Henningsen
On 13 May 2010 00:41, RATIARISON Eric eratiari...@monceauassurances.com wrote: Hi, here my new version: I submit you my case: ( Pseudo likehood for exponential family with offset ) loglik - function(param)  {   b-param   m=as.vector(of+z%*%b)   ll - sum(v*m-exp(m))   } gradlik -

Re: [R] Change order of columns in table?

2010-05-17 Thread Joshua Wiley
Hello, What about something like this? week.table - data.frame(Friday=119, Monday=173, Saturday=80, Sunday=96, Thursday=167, Tuesday=193, Wednesday=194) ordered - c(Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday) week.table - week.table[,ordered] library(plotrix)

[R] plm(..., model=within, effect=twoways) is very slow on unablanaced data (was: Re: Regressions with fixed-effect in R)

2010-05-17 Thread Liviu Andronic
Hello Giovanni I made a minor modification to your function, which now allows to compute the within R-sq in Twoways Within models (see below). However I ran into an issue that I have already encountered before: whenever I try to fit Twoways Within models on my unbalanced data, the process is

[R] [R-pkgs] Rcpp 0.8.0 on CRAN

2010-05-17 Thread Dirk Eddelbuettel
= Summary = Version 0.8.0 of the Rcpp package was released to CRAN today. This release marks another milestone in the ongoing redesign of the package, and underlying C++ library. = Overview = Rcpp is an R package and C++ library that facilitates integration of C++ code in R

Re: [R] Change order of columns in table?

2010-05-17 Thread Gabor Grothendieck
Assuming you really do have a table, tab - as.table(c(Friday=119, Monday=173, Saturday=80, + Sunday=96, Thursday=167, Tuesday=193, Wednesday=194)) tab FridayMonday SaturdaySunday Thursday Tuesday Wednesday 119 1738096 167 193 194 we

[R] Unable to execute lm function within a Rscript launch in the Linux Terminal

2010-05-17 Thread Thomas MORISSEAU
Hello to the list I'm using a Rscript launched via the linux terminal as the title of this mail explains. The following is the code of the Rscript : myRscript.r 1 #!/usr/bin/Rscript 2 3 #Read data 4

[R] Adding a row at top of dataframe

2010-05-17 Thread ecvetano
I have a large data frame 48:2185 with different numbers. I would like to add only one row at the very top of my data frame with 0's or NA's. I don't know which approach to use. Should i create 2 different data frames and merge them? Ive also tried the rbind command with no luck. I would

Re: [R] Box-Cox Transformation: Drastic differences when varying added constants

2010-05-17 Thread Bill Pikounis
Hi Holger, I would also highly recommend you look at the ?boxcox and ?logtrans functions in the MASS package. There is also a very illuminating, concise discussion about their use on Pages 170 - 172 of Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition.

[R] [R-pkgs] Bayesian change point package bcp 2.2.0 available

2010-05-17 Thread Jay Emerson
Version 2.2.0 of package bcp is now available.  It replaces the suggests of NetWorkSpaces (previously used for optional parallel MCMC) with the dependency on package foreach, giving greater flexibility and supporting a wider range of parallel backends (see doSNOW, doMC, etc...). For those

[R] [R-pkgs] bigmemory 4.2.3

2010-05-17 Thread Jay Emerson
The long-promised revision to bigmemory has arrived, with package 4.2.3 now on CRAN. The mutexes (locks) have been extracted and will be available through package synchronicity (on R-Forge, soon to appear on CRAN). Initial versions of packages biganalytics and bigtabulate are on CRAN, and new

[R] BRugs under Linux?

2010-05-17 Thread Kevin E. Thorpe
Hello. In this post: http://finzi.psych.upenn.edu/Rhelp10/2010-March/233815.html Uwe Ligges suggests using BRugs rather than R2WinBUGS under windows. He also notes that it is not in the main CRAN repository, but it is in extras which is a default repository under windows. I have OpenBUGS

Re: [R] Adding a row at top of dataframe

2010-05-17 Thread jim holtman
Try this: x - data.frame(a=1:10, b=1:10) x a b 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10 # add a row at the top x - x[c(1,seq(nrow(x))),] x a b 11 1 1.1 1 1 22 2 33 3 44 4 55 5 66 6 77 7 88 8

[R] [R-pkgs] Bidirectional piping in windows

2010-05-17 Thread Matt Young
Lot of examples for one way pipes, but I need to create some named pipes from R to another process, especially SQLite. I am look at the R/SQLite packages for help. ANy pointers? ___ R-packages mailing list r-packa...@r-project.org

Re: [R] timing a function

2010-05-17 Thread Gustave Lefou
Dear all, I have a function f(x). ptm - proc.time() y=f(x) proc.time() - ptm works fine for me. However it is not possible to write system.time(y=f(x)) and system.time(f(x)) does not store the value of f(x). Should I prefer the 3 lines with proc.time ? Thank you very much, Gustave

[R] Re : append new line in existing graph

2010-05-17 Thread Mohan L
Dear All, I am executing my R script from PHP using the shell_exec. $return = shell_exec(/usr/bin/R --slave --args .$Domain.,.$Gender. /var/www/html/trends/newTrend.R); In newTrend.R, I am plotting graph and save in pdf file using the below code. It will create a pdf file with two line.

Re: [R] Adding a row at top of dataframe

2010-05-17 Thread Nikhil Kaza
Does this work? data(cars) cars2 - cars cars2[2:nrow(cars)+1,] - cars2[1:nrow(cars),] cars2[1,] - NA Nikhil Kaza Asst. Professor, City and Regional Planning University of North Carolina nikhil.l...@gmail.com On May 17, 2010, at 11:28 AM, ecvet...@uwaterloo.ca wrote: I have a large data

Re: [R] Adding a row at top of dataframe

2010-05-17 Thread Peter Ehlers
On 2010-05-17 9:28, ecvet...@uwaterloo.ca wrote: I have a large data frame 48:2185 with different numbers. I would like to add only one row at the very top of my data frame with 0's or NA's. I don't know which approach to use. Should i create 2 different data frames and merge them? Ive also

Re: [R] Running gplots package with Windows 7

2010-05-17 Thread Aaron Gusdon
Thank-you for the replies. I believe I figured out what the problem was. When I installed the package on linux it ran smoothly, but I just need to install a lot of accessory packages to make gplots work with Windows. Thanks again, Aaron 2010/5/17 Uwe Ligges lig...@statistik.tu-dortmund.de

[R] extremely large negative AIC value in lme mode fitting

2010-05-17 Thread Houhou Li
Hi, Everyone, I am trying to fit a ring specific gravity dataset using the linear mixed-effects model (lme function) in R. However, the AIC value is extrememly low (such as -8000) and the loglikehihhod value is extremely big (such as 4000), which seems not correct to me. What could the result

Re: [R] Adding a row at top of dataframe

2010-05-17 Thread Peter Ehlers
On 2010-05-17 11:14, Nikhil Kaza wrote: Does this work? data(cars) cars2 - cars cars2[2:nrow(cars)+1,] - cars2[1:nrow(cars),] cars2[1,] - NA Not for me. Did you try it? -Peter Ehlers Nikhil Kaza Asst. Professor, City and Regional Planning University of North Carolina

Re: [R] bwplot in loop

2010-05-17 Thread GL
Subsequently saw this in FAQs See FAQ: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f -- View this message in context: http://r.789695.n4.nabble.com/bwplot-in-loop-tp2220020p2220034.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] bwplot in loop

2010-05-17 Thread David Winsemius
On May 17, 2010, at 1:36 PM, GL wrote: I have the two loops listed below. The first executes perfectly and creates a series of density plots. The second does not produce any output, however, if I enter the exact bwplot command after the loop executes, I get output for the last value in

Re: [R] Adding a row at top of dataframe

2010-05-17 Thread Nikhil Kaza
Works with warnings for me. but your method is better. Nikhil On May 17, 2010, at 1:35 PM, Peter Ehlers wrote: data(cars) cars2 - cars cars2[2:nrow(cars)+1,] - cars2[1:nrow(cars),] cars2[1,] - NA __ R-help@r-project.org mailing list

[R] Quantile regression - violation of independence

2010-05-17 Thread Valeriano Parravicini
I am trying to perform quantile regression (using quantreg package) and I am particularly interested to know whether the technique requires independence of observations. I am an ecologist and, in particular, I collected data of abundance of a species in 15 location around an island. In each

Re: [R] Quantile regression - violation of independence

2010-05-17 Thread Bert Gunter
This is not an R question, though you may receive help from this list. But you would probably do better posting on a statistical list, especially one focused on ecology. Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org

[R] suggestions/improvements for recoding strategy

2010-05-17 Thread Juliet Hannah
I am recoding some data. Many values that should be 1.5 are recorded as 1-2. Some example data and my solution is below. I am curious about better approaches or any other suggestions. Thanks! # example input data myData - read.table(textConnection(id, v1, v2, v3 a,1,2,3 b,1-2,,3-4

[R] Display Large Matrix as an Image

2010-05-17 Thread tetonedge
I have a matrix that is 2400x2000 and I would like to display it as an image, I have tried image(), but due to the size of the matrix the drawing of the plot is extremely slow. Does anybody know of any fast ways to visualize such a large matrix. Thanks -- View this message in context:

Re: [R] suggestions/improvements for recoding strategy

2010-05-17 Thread Henrique Dallazuanna
Try this: newData - sapply(numdat, function(x)lapply(strsplit(as.character(x), '-'), function(.x)mean(as.numeric(.x On Mon, May 17, 2010 at 3:29 PM, Juliet Hannah juliet.han...@gmail.comwrote: I am recoding some data. Many values that should be 1.5 are recorded as 1-2. Some example data

Re: [R] timing a function

2010-05-17 Thread Barry Rowlingson
On Mon, May 17, 2010 at 6:24 PM, Peter Ehlers ehl...@ucalgary.ca wrote: Try  system.time(y - f(x)) and see ?=.  -Peter Ehlers Ah ha. That explains the curly brackets I saw in a posting with system.time on stack overflow just now: system.time({y=f(x)}) works as expected since the {}

Re: [R] Display Large Matrix as an Image

2010-05-17 Thread baptiste auguie
Hi, try this, m = matrix(runif(2000*2400), nrow=2000) library(grid) grid.raster(m) HTH, baptiste On 17 May 2010 20:35, tetonedge de...@tetonedge.net wrote: I have a matrix that is 2400x2000 and I would like to display it as an image, I have tried image(), but due to the size of the matrix

Re: [R] Adding a row at top of dataframe

2010-05-17 Thread Nikhil Kaza
My mistake. cars2 should be initalized to have all the extra rows. cars2 - data.frame(matrix(rep(NA, prod(dim(cars)) + ncol(cars)), nrow(cars)+1)) cars2[2:nrow(cars2),] - cars In this way, insertion at any row is possible. Nikhil On May 17, 2010, at 2:46 PM, Peter Ehlers wrote: data(cars)

Re: [R] Display Large Matrix as an Image

2010-05-17 Thread tetonedge
That works great, thanks -- View this message in context: http://r.789695.n4.nabble.com/Display-Large-Matrix-as-an-Image-tp2220139p2220219.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] how to save multiple plots in one PDF file?

2010-05-17 Thread Shirley Bao
I have created separate plots in multiple graphics windows using the windows() function in R. How do I save all the plots in one PDF file? I tried savePlot(C:/rplot.pdf, type = pdf). However, it only saved the plot in the current graphics window. Thank you! [[alternative HTML version

Re: [R] how to save multiple plots in one PDF file?

2010-05-17 Thread Jun Shen
1.Open pdf device pdf() 2.Do your plotting as many as you want, you won't see the plots on the screen because they go directly to the pdf() device. 3.Turn off the pdf() dev.off() Then you can review your plots in the pdf file. For more details see ?pdf Jun On Mon, May 17, 2010 at 2:41 PM,

Re: [R] how to save multiple plots in one PDF file?

2010-05-17 Thread Shirley Bao
Thanks! I got an error message when opening the pdf file: There was an error opening this document. This file cannot be opened because it has no pages. Here is what I did in plotting and saving the file: pdf(file=C:/figure.pdf) for (j in 1:numColumns) { windows(width=5, height=5) plot(xj,y) }

Re: [R] how to save multiple plots in one PDF file?

2010-05-17 Thread Jun Shen
If you do plotting in a loop, then you need to print it to the device. print(plot(xj,y)) On Mon, May 17, 2010 at 3:02 PM, Shirley Bao baoxi...@gmail.com wrote: Thanks! I got an error message when opening the pdf file: There was an error opening this document. This file cannot be opened

Re: [R] how to save multiple plots in one PDF file?

2010-05-17 Thread baptiste auguie
No, that's only true for lattice and ggplot2 graphics. The problem here is with this line, windows(width=5, height=5) which shouldn't be there. HTH, baptiste On 17 May 2010 22:23, Jun Shen jun.shen...@gmail.com wrote: If you do plotting in a loop, then you need to print it to the device.

Re: [R] suggestions/improvements for recoding strategy

2010-05-17 Thread Peter Ehlers
On 2010-05-17 12:54, Henrique Dallazuanna wrote: Try this: newData- sapply(numdat, function(x)lapply(strsplit(as.character(x), '-'), function(.x)mean(as.numeric(.x There's a potential problem if numdat contains negative numbers. It would be better to restrict the recoding to character or

[R] Isn't aggreate.zoo supposed to work with POSIXct (zoo/TTR/xts issue)?

2010-05-17 Thread ivan popivanov
library(xts) library(TTR) ndx = getYahooData(^NDX) aa = ndx$Close bb = aggregate(aa, as.yearweek, tail, 1) The last operation takes forever, and then the bb dates are messed up. The following produces the desired result: time(aa) = as.Date(time(aa)) bb = aggregate(aa, as.yearweek, tail, 1)

[R] lme4 + R 2.11.0 + mac unavailable

2010-05-17 Thread Adam November
Hi All, Just thought I'd bring attention to the fact that lme4 is failing cran checks on the mac platform, and I can't seem to install it from source on 10.5 or 10.6, either (ld: library not found for -lgfortran ) . Any help getting this working? Thanks! [[alternative HTML version

Re: [R] lme4 + R 2.11.0 + mac unavailable

2010-05-17 Thread Adam November
Hi All, Just thought I'd bring attention to the fact that lme4 is failing cran checks on the mac platform, and I can't seem to install it from source on 10.5 or 10.6, either (ld: library not found for -lgfortran ) . Any help getting this working? Thanks! (sorry for the non-plain-text...)

Re: [R] lme4 + R 2.11.0 + mac unavailable

2010-05-17 Thread David Winsemius
On May 17, 2010, at 4:44 PM, Adam November wrote: Hi All, Just thought I'd bring attention to the fact that lme4 is failing cran checks on the mac platform, and I can't seem to install it from source on 10.5 or 10.6, either (ld: library not found for -lgfortran ) . Any help getting this

[R] GAM vs. GAMM, how to model increasing error variance?

2010-05-17 Thread Claudia Penaloza
I fit a GAM to turtle growth data using mgcv: m1 - gam(growth~s(mean.size, bs=cr)+s(year,bs=cr,k=7)+s(cohort,bs=cr)+s(age,bs=cr), data=grow, family=quasi(link=identity)) The errors are skewed (and seem to be correlated with age) (code and plots here:

Re: [R] lme4 + R 2.11.0 + mac unavailable

2010-05-17 Thread Adam November
I believe I'm working with the newest version of R (2.11.0) and I've tried a few of the most recent versions... No luck yet. Thanks, -Adam On Mon, May 17, 2010 at 1:51 PM, David Winsemius dwinsem...@comcast.net wrote: On May 17, 2010, at 4:44 PM, Adam November wrote: Hi All, Just thought I'd

Re: [R] timing a function

2010-05-17 Thread Gustave Lefou
Thank you Bill, Peter and Barry. 2010/5/17 Barry Rowlingson b.rowling...@lancaster.ac.uk On Mon, May 17, 2010 at 6:24 PM, Peter Ehlers ehl...@ucalgary.ca wrote: Try system.time(y - f(x)) and see ?=. -Peter Ehlers Ah ha. That explains the curly brackets I saw in a posting

Re: [R] how to save multiple plots in one PDF file?

2010-05-17 Thread Anthony Lopez
one way: x - rnorm(100) y - x+rnorm(100) par(mfrow=c(2,2)) # this sets up the graphics window to expect a 2x2 layout plot(x,y) boxplot(x,y,names=c(var1,var2)) hist(x) hist(y) mtext(fourplots on same page,side=3,outer=T,line=-1.5) and you can adjust as needed to put more or less plots on the

Re: [R] Java API to pass commands to R console from Java Program

2010-05-17 Thread NewRUser
Thanks Cedric. I did take a look at RServe, but that doesn't seem to support concurrency in windows environment. As ours is primarily a windows environment, we are looking for some other ways. Is there any way in rJava/JRI to call commands directly from java code? Thank you. On Sat, May 15,

  1   2   >