Re: [R] Problem in using BATCH command

2011-10-17 Thread hbabai
Hi Every one, I have been struggling with a problem and need your help. I would like to automate execution of a .R file. Therefore i thought of creating a batch file. It reads @echo off start /d C:\Program Files\R\R-2.13.1\bin\x64 R BATCH Model.R No success with running it. The command prompt

Re: [R] Editor for RD file?

2011-10-17 Thread ONKELINX, Thierry
Eclipse with the Stat-ET plugin does syntax highlighting for .R, .Rd and .Rnw files. Best regards, Thierry -Oorspronkelijk bericht- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens Joshua Wiley Verzonden: zondag 16 oktober 2011 22:09 Aan: Bogaso

[R] Portrait and Lanscape PDF in the one document

2011-10-17 Thread Philip Rhoades
People, I want to create a multi-page PDF doc and the pdf command works fine if I only use Portrait OR Landscape but how do I create a document that contains BOTH sorts of pages? Is it possible? - I couldn't find info about it. Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW

Re: [R] ecdf

2011-10-17 Thread gj
Hi Sarah, Thanks for your very lucid explanations. Thanks also to David and Dennis. I got it completely. I now have some nice ggplot of a couple ecdf in my paper :-) Now on to do some matrix plots of correlation matrices and some lm(). I'm like a child in a candy shop. :-) I'm learning something

Re: [R] Portrait and Lanscape PDF in the one document

2011-10-17 Thread Prof Brian Ripley
PDF does not know about portrait/landscape: that is really an issue about whether the MediaBox is taller than it is wide. pdf()'s arguments only set the MediaBox (and where relative to the origin the 'ink' is placed) Note that the orientation of the text on the page does not help: typically

[R] rpy2 pie chart

2011-10-17 Thread Jurgens de Bruin
I am trying to create a pie chart using rpy2 of the following data Pathway Occurrences A 10% B50% C20% E10% filename = './testing.png' grdevices = importr('grDevices') rdevices.png(file=filename, width=1200, height=800) dataf =

[R] plotting issues with PCA

2011-10-17 Thread Andrew Halford
Hi Listers, This has a simple answer but it has been eluding me nonetheless. I have been building a PCA plot from scratch with the ability to plot predefined groups in different colors. This has worked fine but when I try to get a polygon drawn around each of the groups it is not recognising my

Re: [R] pdIdent in smoothing regression model

2011-10-17 Thread Gavin Simpson
On Sun, 2011-10-09 at 10:25 -0400, Lei Liu wrote: Hi there, I am reading the 2004 paper Smoothing with mixed model software in Journal of Statistical Software, by Ngo and Wand. I tried to run their first example in Section 2.1 using R but I had some problems. Here is the code: I'm not

Re: [R] pdIdent in smoothing regression model

2011-10-17 Thread Gavin Simpson
On Sun, 2011-10-09 at 10:25 -0400, Lei Liu wrote: Hi there, I am reading the 2004 paper Smoothing with mixed model software in Journal of Statistical Software, by Ngo and Wand. I tried to run their first example in Section 2.1 using R but I had some problems. Here is the code: [whoops -

Re: [R] plotting issues with PCA

2011-10-17 Thread Gavin Simpson
On Mon, 2011-10-17 at 21:02 +1000, Andrew Halford wrote: Hi Listers, This has a simple answer but it has been eluding me nonetheless. ordiellipse() doesn't work the way you think it does - it can only take a single colour at a time. Therefore you need to do /n/ calls to ordiellipse() to draw

Re: [R] Problem in using BATCH command

2011-10-17 Thread Duncan Mackay
Hi Hami This is what I use when I have run a file using the BATCH command for windows XP D:\rw\bin\R CMD BATCH --no-restore --no-save Rfile.R Rfile_log.txt where D:\rw\bin\R is your R exe file name and path Rfile.R is the R file your are sourcing Rfile_log.txt is the log file - handy if

Re: [R] Beginner's question about ptrend. What package to use in R and a general explanation of the statistics.

2011-10-17 Thread Sarah Goslee
Hi, On Sun, Oct 16, 2011 at 6:24 PM, Bob Briggs rbrig...@hotmail.com wrote: Hello I'm wanting to understand more about ptrend (a statistical explanation via an internet website if possible) and also to know what package in R would produce a ptrend. Appreciate any help I can get on this

[R] Histogram for each ID value

2011-10-17 Thread a217
I have a dataframe in the general format: chr1 0.5 chr1 0 chr1 0.75 chr2 0 chr2 0 chr3 1 chr3 1 chr3 0.5 chr7 0.75 chr9 1 chr9 1 chr22 0.5 chr22 0.5 where the first column is the chromosome location and the second column is some value. What I'd like to do is have a histogram created for each chr

Re: [R] binomial GLM quasi separation

2011-10-17 Thread Gavin Simpson
On Sat, 2011-10-15 at 09:11 -0700, lincoln wrote: #Uwe: snip / #Gavin: I have read carefully your thread but I am not sure to understand what you are suggesting (my gaps in statistics!). You say that it should be due to the /Hauck Donner/ effect and that it is not a quasi separation or

Re: [R] Histogram for each ID value

2011-10-17 Thread Sarah Goslee
Hi, On Mon, Oct 17, 2011 at 8:07 AM, a217 aj...@case.edu wrote: I have a dataframe in the general format: chr1 0.5 chr1 0 chr1 0.75 chr2 0 chr2 0 chr3 1 chr3 1 chr3 0.5 chr7 0.75 chr9 1 chr9 1 chr22 0.5 chr22 0.5 Using dput to give us some reproducible data would be even better.

[R] Trojan in setup file

2011-10-17 Thread Annette Prochnow
Hello, I have the following problem: I successfully installed R (Version 2.1.3.0 for Windows) on my Notebook (Windows 7) in June. Now I used the same setup file for a PC (Windows XP) and got a message from the anti virus software (Avira), that the setup file contains the Trojan

Re: [R] position of first and last axis tick

2011-10-17 Thread Jonas Stein
how can i set the position of the first and last tick to the borderline of a plot? The plot should look like this one made in Gnuplot [1]. Gnu-R adds some space between the ticks and the end of plot. do you mean like this? plot(rnorm(25),rnorm(25), xaxs =i, yaxs=i, xlim=c(-2,2),

[R] [Reading mat files into R]

2011-10-17 Thread Beata Kafel-Mitka
Dear R users, I work with Matlab R simultaneously. Usually I used to read successfully mat files (cell, structure, etc.) into R, till Matlab 2011b release. For reading mat files (or maybe I should say, converting it into R variable or structure) I’m using *readMat* (from “R.matlab”

Re: [R] position of the end of a text file

2011-10-17 Thread R. Michael Weylandt michael.weyla...@gmail.com
Couldn't you also just count the number of characters with nchar()? Michael Weylandt On Oct 17, 2011, at 1:57 AM, Henri-Paul Indiogine hindiog...@gmail.com wrote: I think I have it and my apologies for spamming the list. I should not work this late on Sunday :-) I think that it should be

Re: [R] Histogram for each ID value

2011-10-17 Thread Paul Hiemstra
Hi, When using ggplot, take a look at facet_wrap and geom_histogram. regards, Paul On 10/17/2011 12:14 PM, Sarah Goslee wrote: Hi, On Mon, Oct 17, 2011 at 8:07 AM, a217 aj...@case.edu wrote: I have a dataframe in the general format: chr1 0.5 chr1 0 chr1 0.75 chr2 0 chr2 0 chr3 1

Re: [R] Trojan in setup file

2011-10-17 Thread Achim Zeileis
On Mon, 17 Oct 2011, Annette Prochnow wrote: Hello, I have the following problem: I successfully installed R (Version 2.1.3.0 for Windows) on my Notebook (Windows 7) in June. Now I used the same setup file for a PC (Windows XP) and got a message from the anti virus software (Avira), that the

Re: [R] simultaneously maximizing two independent log likelihood functions using mle2

2011-10-17 Thread Ben Bolker
Adam Zeilinger zeil0006 at umn.edu writes: I have a log likelihood function that I was able to optimize using mle2. I have two years of the data used to fit the function and I would like to fit both years simultaneously to test if the model parameter estimates differ between years, using

[R] Install the rugarch-package

2011-10-17 Thread user84
Hi, i am unable to install the rugarch package. More than that i do not even find this package in my list of possible packages. Its possible than the name has changed, or the package is not longer availiable? Is there a similar package avaliable for garch modelling except the fGarch what i am

Re: [R] Editor for RD file?

2011-10-17 Thread S Ellison
Tinn-R also highlights .rd files and is free. Me, I use TextPad with a latex syntax file. S Ellison -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Bogaso Christofer Sent: 16 October 2011 13:57 To: r-help@r-project.org

Re: [R] SOLVED Legend symbols (line, points) in one column.

2011-10-17 Thread Kenneth Roy Cabrera Torres
Thank you very much for your answer. It works just as I want!. Kenneth El sáb, 15-10-2011 a las 20:39 +0530, Deepayan Sarkar escribió: On Fri, Oct 14, 2011 at 10:02 AM, David Winsemius dwinsem...@comcast.net wrote: Legends are built in columns. You need to find a graphics symbol to put in

[R] Reading data with 'awk' - basics?

2011-10-17 Thread Brian Smith
Hi, I had a large file for which I require a subset of rows. Instead of reading it all into memory, I use the awk command to get the relevant rows. However, I'm doing it pretty inefficiently as I write the subset to disk, before reading it into R. Is there a way that I can read it into an R

Re: [R] Install the rugarch-package

2011-10-17 Thread Prof Brian Ripley
On Mon, 17 Oct 2011, user84 wrote: Hi, i am unable to install the rugarch package. More than that i do not even find this package in my list of possible packages. Its possible than the name has changed, or the package is not longer availiable? No: see

Re: [R] Reading data with 'awk' - basics?

2011-10-17 Thread Gabor Grothendieck
On Mon, Oct 17, 2011 at 9:23 AM, Brian Smith bsmith030...@gmail.com wrote: Hi, I had a large file for which I require a subset of rows. Instead of reading it all into memory, I use the awk command to get the relevant rows. However, I'm doing it pretty inefficiently as I write the subset to

Re: [R] Reading data with 'awk' - basics?

2011-10-17 Thread Prof Brian Ripley
On Mon, 17 Oct 2011, Brian Smith wrote: Hi, I had a large file for which I require a subset of rows. Instead of reading it all into memory, I use the awk command to get the relevant rows. However, I'm doing it pretty inefficiently as I write the subset to disk, before reading it into R. Is

Re: [R] Install the rugarch-package

2011-10-17 Thread John Kerpel
rugarch installs and works fine for me under windows 7 64-bit and R 2.13.1 64 bit. On Mon, Oct 17, 2011 at 7:49 AM, user84 roland.ta...@gmx.at wrote: Hi, i am unable to install the rugarch package. More than that i do not even find this package in my list of possible packages. Its possible

Re: [R] What does \Sexpr[results=rd]{} exactly mean in Rd?

2011-10-17 Thread Gavin Simpson
On Sun, 2011-10-16 at 19:36 -0500, Yihui Xie wrote: Hi, I have spent a few hours on the R-exts manual and the documentation of parse_Rd() (as well as the PDF document in the references), but I still have not figured out what results=rd means. I thought I could use an R code fragment to

Re: [R] heritability estimation

2011-10-17 Thread Juliet Hannah
Search: mcmcglmm heritability to see some discussions using the mcmcglmm package. This package is discussed often on the mixed model list. You can also use the kinship package. It will take some time to get familiar with R. Work through a few of the examples for variance component models, and then

Re: [R] What does \Sexpr[results=rd]{} exactly mean in Rd?

2011-10-17 Thread Yihui Xie
Thanks a lot! Sorry for cross-posting, but I did it intentially because I tend to believe Barry Rowlingson (Why R-help Must Die!), and I will summarize the answers here later to StackOverflow. Another user also told me this worked for 2.13.1, but not later versions. Regards, Yihui -- Yihui Xie

Re: [R] Histogram for each ID value

2011-10-17 Thread Ben Bolker
Paul Hiemstra paul.hiemstra at knmi.nl writes: Hi, When using ggplot, take a look at facet_wrap and geom_histogram. regards, More specifically, try something along the lines of d - data.frame(f=factor(paste(chr,rep(c(1,2,3,7,9,22),each=50),sep=)), v=runif(300)) library(ggplot2)

[R] Plotting GEE confidence bands using predict

2011-10-17 Thread JASON M. HILL
Hello Fellow R Users,I have spent the last week trying to find a work around to this problem and I can't seem to solve it. I simply want to plot my GEE model result with 95% confidence bands. I am using the geepack package to run a basic GEE model involving nestling weights, to a Gaussian

Re: [R] Reading data with 'awk' - basics?

2011-10-17 Thread Brian Smith
Got it. Thanks! On Mon, Oct 17, 2011 at 9:40 AM, Prof Brian Ripley rip...@stats.ox.ac.ukwrote: On Mon, 17 Oct 2011, Brian Smith wrote: Hi, I had a large file for which I require a subset of rows. Instead of reading it all into memory, I use the awk command to get the relevant rows.

Re: [R] Histogram for each ID value

2011-10-17 Thread R. Michael Weylandt
Like others have suggested, I think ggplot2 is probably the best way to go about this, but if you'd rather use base graphics (and you never indicated how you felt about ggplot2), you could do something like this with tapply: fcts - letters[sample(9,1500,T)] vals - rnorm(1500) df -

[R] compressing/reducing data for plot

2011-10-17 Thread Timo Schneider
Hello, I have simulation results in the form of Time V I 0.e+000 7.218354344368e-001 5.224478627497e-006 1.e-009 7.218354344368e-001 5.224477718002e-006 2.e-009 7.218354344368e-001

Re: [R] Beginner's question about ptrend. What package to use in R and a general explanation of the statistics.

2011-10-17 Thread David Winsemius
On Oct 17, 2011, at 8:04 AM, Sarah Goslee wrote: Hi, On Sun, Oct 16, 2011 at 6:24 PM, Bob Briggs rbrig...@hotmail.com wrote: Hello I'm wanting to understand more about ptrend (a statistical explanation via an internet website if possible) and also to know what package in R would

Re: [R] Party package: varimp(..., conditional=TRUE) error: term 1 would require 9e+12 columns (fwd)

2011-10-17 Thread Torsten Hothorn
I would like to build a forest of regression trees to see how well some covariates predict a response variable and to examine the importance of the covariates. I have a small number of covariates (8) and large number of records (27368). The response and all of the covariates are continuous

Re: [R] Plotting GEE confidence bands using predict

2011-10-17 Thread Shige Song
Hi Jason, I would go for Zelig package to get simulated values and confidence intervals. It can handle gee model. Shige On Mon, Oct 17, 2011 at 9:38 AM, JASON M. HILL jmh...@psu.edu wrote: Hello Fellow R Users,I have spent the last week trying to find a work around to this problem and I

Re: [R] rpois 0

2011-10-17 Thread knut-o
thanks guys!! your great -- View this message in context: http://r.789695.n4.nabble.com/rpois-0-tp3906239p3912203.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Creation of mlogit models from text file

2011-10-17 Thread Bhargava Sana
Hello all, Has anyone tried to create an R mlogit model object from a text file? If yes, what would be the best way to do it? I already have models that have been estimated using other software and would like to use R to help me make predictions for new data. Thank you! Bhargava Sana

[R] Extracting results from a function output

2011-10-17 Thread Cem Girit
Hello, I am having hard time obtaining a value from a function. fit is a survival function that produces some results, such as median, confidence intervals etc. But str() function does not list these values. How can I extract these to be able use them? For example, I need median value for the

Re: [R] Creation of mlogit models from text file

2011-10-17 Thread R. Michael Weylandt
You're going to have to say more about your text file if you want meaningful help: specifically, what is in the file: data, output from other software, etc? There are probably two questions to deal with here: reading in whatever is in the text file and mapping it to the correct R object and

Re: [R] Extracting results from a function output

2011-10-17 Thread R. Michael Weylandt
Assuming I'm reading your post correctly -- fit is the output object and the lines following fit are the console output, which implicitly calls print -- it looks like the median isn't stored in fit but is calculated on the fly in the print call. But this doesn't seem consistent with your claim

[R] multiple lines with the same data frame?

2011-10-17 Thread Adel ESSAFI
Bonjour I have this data frame and I am newbie in R. I want to ask if it is possible to draw 10 lines in a plot such that: a line for every colomn, the x - axis is the second column and the y-axis is the third one. Thank you for any input 1 0 1094442 1 0.2 1163576.2 1 0.4 1238539.6 1

Re: [R] Creation of mlogit models from text file

2011-10-17 Thread Bhargava Sana
Michael, Thanks for the quick response. I currently have a few models that have been estimated using Biogeme. I have attached a sample output file from the estimation. I am more concerned about creating a model object from scratch rather than the reading part. Let us just say if we have a

Re: [R] multiple lines with the same data frame?

2011-10-17 Thread R. Michael Weylandt
There are indeed many, many ways in R to do something like you've described. If you are just a beginner, I'd recommend something simple: suppose your data is called df and the columns named are id, x'', and y respectively. with(df, plot(x[id == 1], y[id==1], ylim = range(y), type=l) # Call plot

Re: [R] Extracting results from a function output

2011-10-17 Thread William Dunlap
Often the summary() methods for the modelling functions contain the kinds of details you are looking for. Sometimes there are special extractor functions but often not. You have to study the help file for summary.objectClass and the vignettes for the package, and perhaps do a little

Re: [R] Extracting results from a function output

2011-10-17 Thread David Winsemius
On Oct 17, 2011, at 11:13 AM, Cem Girit wrote: Hello, I am having hard time obtaining a value from a function. fit is a survival function that produces some results, such as median, confidence intervals etc. But str() function does not list these values. How can I extract these to be

[R] Error in ade4 package with rlq

2011-10-17 Thread djleavitt
I am trying to run an rlq analysis on some pretty cool data. The error message I am getting states Error in rlq(dudiR, dudiL, dudiQ, scannf = TRUE, nf = 2) : Non equal row weights Problem for me is that the row weights are equal; that is if the set-up is correct. The contingency tables column

[R] geoXY

2011-10-17 Thread leanne heisler
Hi Everyone, I am new to R Language and was wondering if someone could help me convert my latitude-longitude coordinates to cartesian coordiantes using geoXY() from SoDA package? I have been uploading my coordinates from a text file into R (they originate as a dataframe) and them

[R] Best practices for handling very small numbers?

2011-10-17 Thread Seref Arikan
Greetings I have been experimenting with sampling from posterior distributions using R. Assume that I have the following observations from a normal distribution, with an unscaled joint likelihood function: normsamples = rnorm(1000,8,3) joint_likelihood = function(observations, mean, sigma){

[R] over-estimation Negative Binomial models

2011-10-17 Thread D_Tomas
Hi! I have fitted a Negative Binomial model (glm.nb) and a Poisson model (glm family=poisson) to some count data. Both have the same explanatory variables dataset When I call sum(fitted(model.poisson)) for my GLM-Poisson model, I obtain exactly the same number of counts as my data. However,

[R] how to use 'which' inside of 'apply'?

2011-10-17 Thread Nathan Piekielek
Hello R-community, I am trying to populate a column (doy) in a large dataset with the first column number that exceeds the value in another column (thold) using the 'apply' function. Sample data: pt D1 D17 D33 D49 D65 D81 D97 D113 D129 D145 D161 D177 D193 D209 D225 D241

Re: [R] Best practices for handling very small numbers?

2011-10-17 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Seref Arikan Sent: Monday, October 17, 2011 9:11 AM To: r-help@r-project.org Subject: [R] Best practices for handling very small numbers? Greetings I have been experimenting

Re: [R] how to use 'which' inside of 'apply'?

2011-10-17 Thread R. Michael Weylandt
I think something like this should do it at a huge speed up, though I'd advise you check it to make sure it does exactly what you want: there's also nothing to guarantee that something beats the threshold, so that might make the whole thing fall apart (though I don't think it will) # Sample data

Re: [R] how to use 'which' inside of 'apply'?

2011-10-17 Thread William Dunlap
Try vectorizing it a bit by looping over the columns. E.g., f1 - function (df) { # loop (backwards) over all columns in df whose # names start with D to find the earliest one # that is bigger than column thold. I tested with # df being a data.frame but a matrix should

[R] contouring x y scatter data

2011-10-17 Thread emorway
Hello, I'm almost positive R can do the following, I just haven't hit upon the right package or search terms, however. Here's what I'm after: I've got concentration output from two different models that I want to qualitatively compare in a contour plot (or some variant of a contour plot). The

[R] cut data into sevral group and assign calculated values individually

2011-10-17 Thread Li, Yan
Hi All, I have some data from which I set four points to be breaks. Based on these points, I cut the dataset into four groups and assign a number to it: =331.04 assign 0 331.04 =476.07 assign data-331.04/(476.07-331.04) 476.07=608.66 assign 1 608.66 =791.5 assign 791.5- data/(791.5-608.66)

Re: [R] mgp and axis title positions

2011-10-17 Thread Patrick Connolly
On Sun, 16-Oct-2011 at 03:05PM -0700, Benjamin Cheah wrote: | Hi all, [...] | It is particularly frustrating when you need to adjust axis title | positions separately for x and y axes - i.e. specify mgp twice - | once for each axis within the axis function. But this doesn't seem | to work - is

Re: [R] calculating ratios from all combinations

2011-10-17 Thread 1Rnwb
so here is the code I need help to fix the line for 'st' when it reaches maximum, that's where i am getting stuck. thanks Sharad set.seed(100) d=data.frame(x=rnorm(20)+5, x1=rnorm(20)+5, x2=rnorm(20)+5, x3=rnorm(20)+5, x4=rnorm(20)+5, x5=rnorm(20)+5, x6=rnorm(20)+5, x7=rnorm(20)+5,

Re: [R] How to create a random matrix

2011-10-17 Thread adpb001
Thanks. bb=replicate(2, rnorm(20)) was very useful for me. -- View this message in context: http://r.789695.n4.nabble.com/How-to-create-a-random-matrix-tp901667p3912806.html Sent from the R help mailing list archive at Nabble.com. __

[R] Importing all observations and variables from csv file into dataframe

2011-10-17 Thread Sally Ann Sims
Hello, I need some help getting started with data analysis. I’m having trouble getting R to read my data file. I’ve referred to various R help documentation, the website, and FAQs, but I don’t see my situation listed. I saved an Excel file (post-2007 Excel version) of data as a

Re: [R] Histogram for each ID value

2011-10-17 Thread Philipp Pagel
where the first column is the chromosome location and the second column is some value. What I'd like to do is have a histogram created for each chr location (i.e. a separate histogram for chr1, chr2, chr3, chr7, chr9, and chr22). I am just having a hard time getting everything to work out

Re: [R] Scatterplot with the 3rd dimension = color?

2011-10-17 Thread Kerry
Thanks, I consider all of those options and tried some, but the z=color gradient seems the best option for my data. kb On Oct 2, 10:42 pm, Ben Bolker bbol...@gmail.com wrote: Duncan Murdoch murdoch.duncan at gmail.com writes: On 11-10-02 1:11 PM, Kerry wrote: I have 3 columns of

Re: [R] Scatterplot with the 3rd dimension = color?

2011-10-17 Thread Kerry
Oh, I just saw your ggplot example, that works well too. However, it seems much of the options are hidden for changing the range of colors or the color types altogether. I'm currently looking through the ggplot ref manuals. Thanks, kb On Oct 2, 10:42 pm, Ben Bolker bbol...@gmail.com wrote:

Re: [R] Importing all observations and variables from csv file into dataframe

2011-10-17 Thread jim holtman
I would assume that you would use 'read.csv'. I don't know where you got the syntax for summary; x - read.csv((C:\\Documents\\R_dfiles\\H_N_T.csv,as.is=TRUE) summary(x) On Mon, Oct 17, 2011 at 2:56 PM, Sally Ann Sims sallys...@earthlink.net wrote: Hello, I need some help getting started with

Re: [R] heritability estimation

2011-10-17 Thread Moohbear
Thanks for the info. I am working with Recombinant Inbred Lines(RILs), not pedigree, so most of what I could find does not apply to my work. I've found a couple of tutorials explaining how to use analysis of variance components with lme4, but I don't have multiple measurements per individual per

Re: [R] Importing all observations and variables from csv file into dataframe

2011-10-17 Thread R. Michael Weylandt
You aren't reading the file in at all: notice that, summary(MooGoesTheCow,header=TRUE,as.is=TRUE) Length Class Mode 1 character character This is because you are asking for a summary of the string containing the file name, not the file itself. Rather, use X =

Re: [R] how to use 'which' inside of 'apply'?

2011-10-17 Thread William Dunlap
Your original code works far faster when the input is a matrix that when it is a data.frame. Selecting a row from a data.frame is a very slow operation, selecting a row from a matrix is quick. Modifying a row or a single element in a data.frame is even worse compared to do it on a matrix. I

Re: [R] right justify right-axis tick values in lattice

2011-10-17 Thread Deepayan Sarkar
On Sun, Oct 16, 2011 at 7:20 PM, David Winsemius dwinsem...@comcast.net wrote: On Oct 16, 2011, at 1:17 AM, Richard M. Heiberger wrote: How can I right justify the right-axis tick values?  They appear in the example below as left-justified. I have tried several different ways and all fail

Re: [R] how to use 'which' inside of 'apply'?

2011-10-17 Thread William Dunlap
data.frames are quite efficient when you use a column at a time, but not when used a row at a time. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: Nathan Piekielek [mailto:npiekie...@gmail.com] Sent: Monday, October 17, 2011 12:37 PM To: William

[R] Adjusted Means

2011-10-17 Thread Mattune
I'm running the following ANCOVA model in R: X=a*b*d + d where d is the covariate. I want to produce adjusted means for X for all possible treatment combinations. a has 6 levels, b has 2 levels, c has 2 levels, so this is a 6x2x2 = 24 possible treatment combinations. When I run: effect(d,

Re: [R] Scatterplot with the 3rd dimension = color?

2011-10-17 Thread Kerry
Here's my loadable data in case it helps. It creates 2 separate plots which I'd like to be in the same graph with 2 separate legends. library(ggplot2) #Here's the 1st plot x-rnorm(100) y-rnorm(100) z-rnorm(100) d - data.frame(x,y,z) dg-qplot(x,y,colour=z,data=d) dg +

[R] Foreach (doMC)

2011-10-17 Thread Rui Esteves
Hello, I am trying to run a small example with foreach, but I am having some problems. Here is the code: *library(doMC) registerDoMC() zappa = list() frank = list() foreach (i = 1:4) %dopar% { zappa[[i]] = kmeans (iris[-5],4) frank[[i]] = warnings() }* The code runs without error. However

[R] Independent component analysis with only one source of data

2011-10-17 Thread Noah Silverman
Hi, Looking at the fastICA library. I want to test separating out different sounds from a recorded wav file. But, I only have a SINGLE stream of data (one channel wav.) It appears as if the fastICA won't let me separate more sounds than I have columns in my data matrix. is this correct?

Re: [R] Scatterplot with the 3rd dimension = color?

2011-10-17 Thread Kerry
Yes, the qplot works great, but do you know how to allow for multiple plots? I want one variable to be plotted say from blue to red and another say from yellow to green but in the same graph, each having there own separate legends. I've tried print() and arrange() but no luck. Thanks again, kb

[R] Build 64-bit R Solaris 10 Sparc

2011-10-17 Thread Nynese Tinsley
Hello All, Has anyone had success building 64-bit R on Solaris 10 Sparc with the Oracle Studio Compiler suite? Could anyone start give me a clue. I have tried to no avail. Thanks, Nynese Nynese Tinsley, BSEE, MSCIS UNIX Systems Analyst Harvard School of Public Health Center for

Re: [R] Adjusted Means

2011-10-17 Thread John Fox
Dear Mattune, I guess that you're using the effect() function in the effects package. You've requested the effect for the covariate fixing the values of the factors, rather than vice-versa. Try effect(a*b*c, Anocova.Model) or, for more detail in the output, summary(effect(a*b*c, Anocova.Model)).

Re: [R] calculating ratios from all combinations

2011-10-17 Thread R. Michael Weylandt
On Mon, Oct 17, 2011 at 4:31 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: I have no idea what's going on in the code you provided, particularly why there are no ratios given your subject line or why you are looping over an unused variable, but how about this: n - colnames(d) n -

Re: [R] Creation of mlogit models from text file

2011-10-17 Thread R. Michael Weylandt
I'm not at all familiar with mlogit or Biogene so I can't really give a definitive answer, but it seems that this would be a very dangerous thing to try. Looking at the mlogit manual, I see that, like most model objects in R, mlogit has a variety of elements including many of those you

Re: [R] Build 64-bit R Solaris 10 Sparc

2011-10-17 Thread Prof Brian Ripley
The instructions *are* in the manual, and they do work: I checked for R 2.14.0 beta only this morning. On Mon, 17 Oct 2011, Nynese Tinsley wrote: Hello All, Has anyone had success building 64-bit R on Solaris 10 Sparc with the Oracle Studio Compiler suite? Could anyone start give me a

[R] Analyze each factor separtely

2011-10-17 Thread kickout
Hello Trying to apply a model to each level of a factor For example, i have three levels of a variable I call 'Code'...I want to model the data under each level of code differently...I've attached a sample data set... http://r.789695.n4.nabble.com/file/n3913431/data.txt data.txt I.E for

[R] Converting list of lists into dataframes

2011-10-17 Thread xhan
Hi, I have a list of lists that I would like to convert into a dataframe such that the name(?) of the individual lists is replicated as rows with each item in the list listed in another column. I have provided a partial from my list: (let's say the list is called help.me) [[2]] [1] 18 27 11

Re: [R] Creation of mlogit models from text file

2011-10-17 Thread Bhargava Sana
Yes, there seem to be a lot of elements in the mlogit model object and I don't have some of that information now since the models have been estimated in Biogeme. I had been trying some of the steps that you suggested (after I posted my question) and as you mentioned, realized that this is

Re: [R] Converting list of lists into dataframes

2011-10-17 Thread Dennis Murphy
In the absence of a reproducible example (your example is not reproducible as is), try this: names(help.me) - as.character(2:4) library('plyr') newDF - ldply(help.me, rbind) newDF[['.id']] - as.numeric(newDF[['.id']]) ldply will create a new column named .id that contains the name of the list

[R] using mean substitution

2011-10-17 Thread Michael Parent
Hi, all, I'm running a monte carlo simulation with missing data. The data are arranged such that there are k columns and n rows over a set number of simulations (set to 10 right now so it runs fast while I set everything up). The data are integers, numbers 1-7 only (normal distribution). The

Re: [R] contouring x y scatter data

2011-10-17 Thread Carlos Ortega
Hi, Please check if this representation helps you. library(lattice) library(latticeExtra) p1.gr - cloud( ts181 ~ x * z, data=FD, panel.3d.cloud = panel.3dbars, scales = list(arrows = FALSE, just = right)) p2.gr - cloud( ts1825 ~ x * z, data=FD, panel.3d.cloud = panel.3dbars, scales = list(arrows

Re: [R] Converting list of lists into dataframes

2011-10-17 Thread David Winsemius
On Oct 17, 2011, at 5:11 PM, xhan wrote: Hi, I have a list of lists that I would like to convert into a dataframe such that the name(?) of the individual lists is replicated as rows with each item in the list listed in another column. I have provided a partial from my list: (let's say

Re: [R] compressing/reducing data for plot

2011-10-17 Thread Carlos Ortega
Hello, One alternative is to create some kind of contourplot/levelplot which will enhance and show clearly the spikes and will smooth the rest of the information. That perhaps will be slow in generating the plot but not with the postscript file. Regards, Carlos Ortega www.qualityexcellence.es

Re: [R] contouring x y scatter data

2011-10-17 Thread emorway
Hi Carlos, Thanks for the response. The plot you suggested was not in line with what I'm trying to produce in R. The last plot found at: http://www.advsofteng.com/gallery_contour.html is more along the lines of what I'm looking for. Notice the scatter points (shown by x) are not laid

Re: [R] contouring x y scatter data

2011-10-17 Thread David Winsemius
On Oct 17, 2011, at 5:59 PM, emorway wrote: Hi Carlos, Thanks for the response. The plot you suggested was not in line with what I'm trying to produce in R. The last plot found at: http://www.advsofteng.com/gallery_contour.html is more along the lines of what I'm looking for. Notice

[R] Beginner's question about plotting variables in a time series object with the date on the x axis

2011-10-17 Thread Iara Faria
Dear R helpers,   I am a beginner at R so please be gentle :) I have already read manuals and FAQs, with no help. I have a monthly time series data on public debt with 40 variables, it starts on January 1994 and ends on June 2011. I am loading the data into R using read.csv and the data looks ok

[R] special language character in a pie chart

2011-10-17 Thread milena
Dear List Members, I am working on a below piece of code: Initially have created pie charts with Enlish labels to present the data for Czech Republic, now however I need to print the label with original Czech fonts. When I copy paste from Word, certain fonts get 'simplified' distorting original

Re: [R] using mean substitution

2011-10-17 Thread Rolf Turner
On 18/10/11 10:35, Michael Parent wrote: Hi, all, I'm running a monte carlo simulation with missing data. The data are arranged such that there are k columns and n rows over a set number of simulations (set to 10 right now so it runs fast while I set everything up). The data are integers,

Re: [R] contouring x y scatter data

2011-10-17 Thread emorway
Thank you David, I'm moving forward again. I was not aware of that website, I was recently at http://www.r-project.org/ and clicked on the 'mailing list' link and didn't see it there...with 8k+ posts, maybe its worth adding? -- View this message in context:

Re: [R] Beginner's question about plotting variables in a time series object with the date on the x axis

2011-10-17 Thread R. Michael Weylandt
I'm not a huge fan of using R's ts class directly, much preferring to use zoo or xts (both of which are packages) to enhance. That said, I think your problem comes from identifying the data/variable name incorrectly. You've only tsed dados, but you try to plot divliq.pib; try

Re: [R] using mean substitution

2011-10-17 Thread Michael Parent
That worked perfectly, thanks!! I'd assumed that it wasn't necessary for me to type out ...based on a MV normal distribution that I made into 1-7 integers by blah blah blah; the distribution is normal-ish after I transform it around for the purposes I need for the simulations. I'll be sure to

  1   2   >