Re: [R] How to call an external program/web page under R for Mac OS?

2011-05-24 Thread Paul Hiemstra
On 05/24/2011 10:56 PM, jbrezmes wrote: > I would like to be able to call external programs such as Java scripts (*.jar > files) or bring up the browser to a given direction. Can that be done from > R? > > I am running R on a mac OS X system. > > Thanks again for any suggestions or solutions. > >

[R] plotting texas school district using shape files

2011-05-24 Thread Shant Ch
Hi, I was plotting or creating a map for Texas school districts using the shape file of Texas. I could not find any other helpful mail in the mailing list. txshp<-read.shape(system.file("S:\\Districts_10_11.shp", package="maptools")) Error- read.shape no found. But read.shape is there in map

[R] Processing large datasets

2011-05-24 Thread Roman Naumenko
Hi R list, I'm new to R software, so I'd like to ask about it is capabilities. What I'm looking to do is to run some statistical tests on quite big tables which are aggregated quotes from a market feed. This is a typical set of data. Each day contains millions of records (up to 10 non filtered).

Re: [R] panel.first problem when plotting with formula

2011-05-24 Thread Gene Leynes
Peter, Good idea! (why didn't I think of that?) If it stumped the r-list, I think there is probably a slight bug with the plot formula. Problems like this make me realize how amazingly full featured and relatively bug free R is. A problem like this would never happen in Excel, because this lev

[R] Adding Mean to Notched Box Plots

2011-05-24 Thread kydaviddoyle
Hello everyone, I'm new to R and made my 1st notched box plots this weekend. I've read some of the other post regarding adding means to box plots but I'm still having problems. I've looked at some of the other discussions and R News Volume 3/2, October 2003 which had info also but all these se

Re: [R] help on permutation/randomization test

2011-05-24 Thread Greg Snow
OK, I was not sure from your description, if there had been a large number of small clusters then my suggestion would have worked, but it looks like now that there would be too much cluster overlapping. I know that there are bootstrap methods used on time series data that sample blocks of data

Re: [R] Border-Layout by multiple Plots

2011-05-24 Thread Paul Murrell
Hi On 19/05/2011 9:43 p.m., Stuber Thomas TA.I_BB_BS.0701 wrote: Hello R-Community I did a lot of research, but i found no answer for my issue. I try to plot multiple Plots. I do this with the layout() function. The following two pictures show the defined layout: http://www.stuber.info/layout_

Re: [R] How to call an external program/web page under R for Mac OS?

2011-05-24 Thread Gustavo Carvalho
To open a website on the default browser: system("open http://www.google.com";) Gustavo. On Tue, May 24, 2011 at 7:56 PM, jbrezmes wrote: > I would like to be able to call external programs such as Java scripts (*.jar > files) or bring up the browser to a given direction. Can that be done from

[R] Fwd: Opening R in 64-bit version by default

2011-05-24 Thread Michael Sumner
When you installed R there should be shortcuts on your desktop, or under /R/ in the start menu unless you opted for the installation to not create those. Click (or double-click) the one that has a name like "R x64 2.13.0" - the x64 indicates that the shortcut is for the 64-bit R. You won't have th

Re: [R] help on permutation/randomization test

2011-05-24 Thread Wenjin Mao
Thanks, Greg. I also considered the clusters. The difficulty is those objects not only enter the system at different time, but may have different duration in the system. Once they have a time overlap in the system, impacts may exist. If splitting into two clusters by setting a time threshold t, I

[R] How to call an external program/web page under R for Mac OS?

2011-05-24 Thread jbrezmes
I would like to be able to call external programs such as Java scripts (*.jar files) or bring up the browser to a given direction. Can that be done from R? I am running R on a mac OS X system. Thanks again for any suggestions or solutions. Best regards, Jesus Brezmes -- View this message in co

[R] Interactive plots or graphics libraries for R?

2011-05-24 Thread jbrezmes
Hello to all: I want to be able to create regular and 3D plots that are interactive with the mouse, so i can zoom in/out of a given zone, etc, as close as possible as what it is done with matlab. Are there any libraries written for R for that purpouse? I know there are wonderful static graphics l

[R] gbm package: plotting a single tree

2011-05-24 Thread ElenaC
Hello, I'm not sure if Im posting this on the right place, my apologies if not. I'm using the package gbm to generate boosted trees models, and was wondering if there is a simple way of getting a graphical output for a single tree of the sequence. I know the function "pretty.gbm.tree" can be use

Re: [R] seeking help on using LARS package

2011-05-24 Thread Steve Lianoglou
Hi, On Tue, May 24, 2011 at 12:50 PM, Vishal Thapar wrote: > Hi, > > I am writing to seek some guidance regarding using Lasso regression with the > R package LARS. I have introductory statistics background but I am trying to > learn more. Right now I am trying to duplicate the results in a paper

Re: [R] help on permutation/randomization test

2011-05-24 Thread Greg Snow
If the x's that don't enter at the same time can be considered independent of each other, and only clusters that enter at the same time are dependent, then you can still do a permutation test by creating clusters with dependent values within each cluster, but independent between clusters, then p

Re: [R] What are the common Standard Statistical methods used for the analysis of a dataset

2011-05-24 Thread Greg Snow
The only statistical method that I know of that can be applied to any dataset without further definition of the nature of the data or the question being asked is SnowsCorrectlySizedButOtherwiseUselessTestOfAnything which is found in the TeachingDemos package for R. However this test is not comm

Re: [R] Interactive plots or graphics libraries for R?

2011-05-24 Thread David A. Johnston
I recommend the 'rgl' package. It can draw 3d scatterplots, shapes, and surfaces. You can spin, and zoom in with the mouse. You can record a "movie" of the rotating graphic. http://cran.r-project.org/web/packages/rgl/index.html -David Johnston -- View this message in context: http://r.7896

Re: [R] Random Forest

2011-05-24 Thread Peter Langfelder
On Tue, May 24, 2011 at 3:18 PM, Unger, Rachel wrote: > I'm analyzing data using Random Forest Regression.  For some of the > species I am analyzing, the percent variation explained is negative. > Could you please explain to me what that means?  If you need more > information, please let me know.

[R] Random Forest

2011-05-24 Thread Unger, Rachel
I'm analyzing data using Random Forest Regression. For some of the species I am analyzing, the percent variation explained is negative. Could you please explain to me what that means? If you need more information, please let me know. Thank you. Sincerely, Rachel Unger [[altern

[R] Simulating data with conditions

2011-05-24 Thread AC Del Re
Hi, I am wanting to simulate data where a percentage of the data has multiple duplicated id variables (with unique values of another factor variable for the dupicated id variables). Im having trouble figuring out an efficent way to do so. For example, consider this mock output [Note: Although the

Re: [R] Fortran DLL in Spotfire

2011-05-24 Thread Ben Bolker
vioravis gmail.com> writes: > > I have a R code that loads a FORTRAN DLL to do some calculations. The code > works fine when I use it in R. But when I try it in spotfire it throws an > error that the it is unable to load the shared library and the specified DLL > cannot be found. I have used "se

Re: [R] Count of rows while looping through data

2011-05-24 Thread Phil Spector
Jeanna - I can't imagine how you could solve this problem with a loop, but here's one way to solve it using R: First, I'll create a data frame with a family variable: x = data.frame(family = rep(1:20,sample(2:5,20,replace=TRUE))) Next, I'll number each family member within each family:

Re: [R] escape characters in shell commands

2011-05-24 Thread Gabor Grothendieck
On Tue, May 24, 2011 at 1:40 PM, James Rome wrote: > On a Windows platform I am trying to count the number of lines in a file. > In a DOS window, the following works: > C:\Users\jar>findstr /R /N "^" D:\my_dir\my_file | find /C ":" > 5317 > (it works with double \\ also) > > But in R, I need to ma

Re: [R] escape characters in shell commands

2011-05-24 Thread Steven Kennedy
As a different approach, you could just use the readLines function: length(readLines(D:\my_dir\my_file)) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-g

Re: [R] R as.numeric()

2011-05-24 Thread Ista Zahn
This is a FAQ: http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numeric_003f Please try there before posting a question to the list. Best, Ista On Tue, May 24, 2011 at 5:33 PM, David Scott wrote: > On 25/05/2011 9:20 a.m., Lutz Fischer wrote: >> >> Hi, >> >> I have a bit

Re: [R] R as.numeric()

2011-05-24 Thread Timothy Bates
On 24 May 2011, at 10:20 PM, Lutz Fischer wrote: > n<-data.matrix(s); > > s[1,2] > [1] 30.94346629 # 3136 Levels: 0.026307482 > turned into: > > n[1,2] > [1] 3020 Dear Lutz, “3020” is the factor level associated with 30.94346629, in turn generated by importing with strings in the column Try pas

Re: [R] R as.numeric()

2011-05-24 Thread David Scott
On 25/05/2011 9:20 a.m., Lutz Fischer wrote: Hi, I have a bit of a problem with as.numeric or as.double. I read in an excel-file (either xlsx::read.xlsx2 or gdata::read.xls). Select a subset and then try to make it numeric: # read in the excel-file alldata<-read.xlsx2("input.xls",1) # select

Re: [R] How to intantiate a list of data.frames?

2011-05-24 Thread Joshua Wiley
Hi Rui, Please look at the documentation for ?write.csv I do not have oilDF, but my guess is that you make the object, "ds" fine, but then you are trying to pass a list to write.csv which works on matrices or data frames (or attempts to coerce to such). The easiest answer is probably to write ea

[R] R as.numeric()

2011-05-24 Thread Lutz Fischer
Hi, I have a bit of a problem with as.numeric or as.double. I read in an excel-file (either xlsx::read.xlsx2 or gdata::read.xls). Select a subset and then try to make it numeric: # read in the excel-file alldata<-read.xlsx2("input.xls",1) # select the subset s<-subset(alldata, select=c("cI","c

Re: [R] Beginner Question: List value without Levels

2011-05-24 Thread Joshua Wiley
Hi dabs, Thanks for that. Part of your problem is that the data in myVals is not being stored as numbers, it is stored as factors. If "," is your decimal separator, then something like: myVal2 <- unlist(myVal) myVal2 <- as.numeric(levels(myVal2))[myVal2] should convert it to numeric class data

Re: [R] writing dates to a file

2011-05-24 Thread David Winsemius
On May 24, 2011, at 4:00 PM, Andy Zhu wrote: I think if you attach the output file would make clear. I guess it is very likely your merge has the problem, not the write.table. No. The merge woks fine. write.table is not writing the date indices but write.zoo would. Tested. -- david. You

Re: [R] ANOVA Residual SS and MS of 0

2011-05-24 Thread Bert Gunter
> Where do I begin troubleshooting such a problem? 1. By examining your data to see whether you have entered it correctly. 2. By reading the posting Guide at the bottom of this and every message and doing as it asks (posting a portion of your data and R code so that we can see what you did). 3.

Re: [R] writing dates to a file

2011-05-24 Thread Gabor Grothendieck
On Tue, May 24, 2011 at 2:34 PM, Heiman, Thomas J. wrote: > Hi, > > I have attached the data files to this note.   I use this code: > > library(zoo) > z1 <- read.zoo("baltimorefludata.txt", format = "%m/%d/%Y", header = TRUE) > z2 <- read.zoo("baltimorew.txt", format = "%Y%m%d", header = TRUE) > >

Re: [R] writing dates to a file

2011-05-24 Thread Andy Zhu
I think if you attach the output file would make clear.  I guess it is very likely your merge has the problem, not the write.table.  You may need "by" parameter in merge based on the date.  It also could be date value is converged to numeric value, in this case you just need to convert it back.

Re: [R] Beginner Question: List value without Levels

2011-05-24 Thread dabs
Hey Joshua, thanks for your help. Here are the dput outputs :)! >dput(myVal) structure(list(I = structure(1L, .Label = "4,5", class = "factor"), V = structure(1L, .Label = "4,2", class = "factor"), L = structure(1L, .Label = "3,8", class = "factor"), F = structure(1L, .Label = "2,8", c

[R] ANOVA Residual SS and MS of 0

2011-05-24 Thread Rovinpiper
I am trying to run an ANOVA on my soil respiration data, but I keep getting residual sum of squares and mean square of zero. As I understand it that would mean that the model terms explain all of the variation in the response variable. That should be virtually impossible, should it not? Where do

[R] Count of rows while looping through data

2011-05-24 Thread Jeanna
I have a data table with one column that indicates families, and subsequent columns with other characteristics. I want to randomize one member of the family to a separate table. My approach is to count the number of members, set up a random number generator, and assign the family member based on

Re: [R] Order a matrix

2011-05-24 Thread Lisa
Hi, Bill, Thank you for your help. Your R script works very well. Lisa -- View this message in context: http://r.789695.n4.nabble.com/Order-a-matrix-tp3547923p3548017.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.

Re: [R] How do I assign boolean (o,1) values to a column?

2011-05-24 Thread Steve Lianoglou
Hi, On Tue, May 24, 2011 at 9:46 AM, Xenimes wrote: > Thank you David and Steve, > > Yes all this data are already in R and in csv files. That's nice, but as I said before: please use 'dput' or 'dump' on your data.frame (or some reasonable portion of it) and paste that result into an email so th

Re: [R] Data Frame housekeeping

2011-05-24 Thread David Winsemius
On May 24, 2011, at 3:03 PM, Scott Hatcher wrote: Hello, I have a large data frame that is organized by date in a peculiar way. I am seeking advice on how to transform the data into a format that is of more use to me. The data is organized as follows: STN_ID YEAR MM ELEM X1

Re: [R] Opening R in 64-bit version by default

2011-05-24 Thread Duncan Murdoch
On 24/05/2011 1:27 PM, Josh Browning wrote: Oh, of course, sorry. I'm running Windows 7. Thanks! Your question is probably a question for Microsoft. Why doesn't whatever you did work? Someone here might be able to help if you describe what you did. I just tried "Open with..." and select

Re: [R] Data Frame housekeeping

2011-05-24 Thread Jonathan Daily
My suggestion, since bold doesn't show up in a text only mailing list, would be to look into the function ?aggregate. It looks like something like (assuming your data is in a mydat): mydat.new <- aggregate(cbind(STN_ID, YEAR, MM, DAY) ~ ELEM + ?, mydat, FUN = ?) #this is up to you Alternatively,

Re: [R] Beginner Question: List value without Levels

2011-05-24 Thread Joshua Wiley
Hi Dabs, If those are your two objects, could you post the output from: dput(myVal) dput(data) The output of dput() can be copied and pasted into the console and then we have the data on our systems exactly as you do on yours. From there it should be easy to show you how to do what you want. C

Re: [R] Order a matrix

2011-05-24 Thread William Dunlap
Try using do.call("order", listOfColumnsToSortBy), as in cols <- c(1,3,4) x[do.call("order", as.data.frame(x[,cols])), ] To be really safe you should remove the names from the data.frame produced by as.data.frame (in case they match the argument names of order), as in x[do.call("order", unna

Re: [R] writing dates to a file

2011-05-24 Thread David Winsemius
On May 24, 2011, at 2:34 PM, Heiman, Thomas J. wrote: Hi, I have attached the data files to this note. I use this code: library(zoo) z1 <- read.zoo("baltimorefludata.txt", format = "%m/%d/%Y", header = TRUE) z2 <- read.zoo("baltimorew.txt", format = "%Y%m%d", header = TRUE) z3<-merge(z1

[R] Beginner Question: List value without Levels

2011-05-24 Thread dabs
Hey folks, I'm new to the R Project so I'm facing a great problem. I've read a file into R: >myVal I V L F C M AGTWSYPHQD NEKR 1 4,5 4,2 3,8 2,8 2,5 1,9 1,8 -0,4 -0,7 -0,9 -0,8 -1,3 -1,6 -3,2 -3,5 -3,5 -3,5 -3,5 -3,9 -4,5 > mode(

[R] Data Frame housekeeping

2011-05-24 Thread Scott Hatcher
Hello, I have a large data frame that is organized by date in a peculiar way. I am seeking advice on how to transform the data into a format that is of more use to me. The data is organized as follows: STN_ID YEAR MM ELEM X1 X2 X3 X4 X5X6

[R] superimposing some random points on a plot

2011-05-24 Thread Debs Majumdar
Hi All, i) I wanted a plot with a x axis that ranges from 25 to 75 points  and 2 normal curves on it with y-axis suppressed. ii) One with mean 60 and standard error 2 and the other one with mean 40 and standard error 5. iii) At last, I'd like you to pull some random values from those distribu

[R] Order a matrix

2011-05-24 Thread Lisa
Dear all, I just want to order a matrix using several columns in a matrix. For example: x <- matrix(sample(c(1:5), 60, replace = T), 10, 6). If I order the matrix by the first two columns, I will do it like this: x[order(x[, 1], x[, 2]), ]. But when I repeat this work many times and the colu

Re: [R] Extracting day of month from Date objects

2011-05-24 Thread David Winsemius
On May 24, 2011, at 1:34 PM, Phil Spector wrote: I've always found the chron library to be useful for tasks like this: x <- round(runif(10)*10, digits=0) y <- as.Date(x, origin="1970-01-01") library(chron) days(y) [1] 7 25 26 25 10 24 1 31 12 8 31 Levels: 1 < 2 < 3 < 4 < 5 < 6 < 7 < 8

[R] Fortran DLL in Spotfire

2011-05-24 Thread vioravis
I have a R code that loads a FORTRAN DLL to do some calculations. The code works fine when I use it in R. But when I try it in spotfire it throws an error that the it is unable to load the shared library and the specified DLL cannot be found. I have used "setwd" to point to the location in the spot

Re: [R] Extracting day of month from Date objects

2011-05-24 Thread Kang Min
Thanks Phil, chron is good. On May 25, 1:34 am, Phil Spector wrote: > I've always found the chron library to be useful for > tasks like this: > > > x <- round(runif(10)*10, digits=0) > > y <- as.Date(x, origin="1970-01-01") > > library(chron) > > days(y) > >   [1] 7  25 26 25 10 24 1  31 12 8

Re: [R] Opening R in 64-bit version by default

2011-05-24 Thread Josh Browning
Oh, of course, sorry. I'm running Windows 7. Thanks! Josh -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Tuesday, May 24, 2011 11:25 AM To: Josh Browning Cc: r-help@r-project.org Subject: Re: [R] Opening R in 64-bit version by default On May 24, 2011,

Re: [R] anyone using LARS package in R

2011-05-24 Thread Bert Gunter
Take a look at the glmnet package which extends LARS and has an associated vignette. Also check Trevor Hastie's and Rob Tibshirani's web pages at Stanford for references and papers. -- Bert On Tue, May 24, 2011 at 11:07 AM, Vishal Thapar wrote: > Hi useR's, > > Has anyone used the "Lars" package

Re: [R] R in batch mode

2011-05-24 Thread Jonathan Daily
myR.bat is a microsoft batch file, meant to be run from the windows command line. If you are in R, you can run R files using a single command. Please try reading the Introduction to R that ships with R. This is a question that anyone who has made an effort at learning R would know. On Tue, May 24

[R] anyone using LARS package in R

2011-05-24 Thread Vishal Thapar
Hi useR's, Has anyone used the "Lars" package in R before? If so, is there any tutorial (not manual) or worked out example online for this R package that one can go through to figure out how one can use this package with lasso regression? I appreciate any help I can get in this direction. Sincer

Re: [R] R in batch mode

2011-05-24 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Dear Jonathan (and List), Sorry for bothering you again, and I am requesting your further guidance on this subject. Below are the steps, which I have followed. But I got an error message. 1. The content of myR.bat is as follows: "C:\R\bin\i386\R\R-2.10.0\bin\Rterm.exe" --no-restore --no-sav

[R] escape characters in shell commands

2011-05-24 Thread James Rome
On a Windows platform I am trying to count the number of lines in a file. In a DOS window, the following works: C:\Users\jar>findstr /R /N "^" D:\my_dir\my_file | find /C ":" 5317 (it works with double \\ also) But in R, I need to make this string up with the file name I get from file.choose(): fi

Re: [R] Extracting day of month from Date objects

2011-05-24 Thread Phil Spector
I've always found the chron library to be useful for tasks like this: x <- round(runif(10)*10, digits=0) y <- as.Date(x, origin="1970-01-01") library(chron) days(y) [1] 7 25 26 25 10 24 1 31 12 8 31 Levels: 1 < 2 < 3 < 4 < 5 < 6 < 7 < 8 < 9 < 10 < 11 < 12 < 13 < ... < 31 Notice that it

Re: [R] Opening R in 64-bit version by default

2011-05-24 Thread David Winsemius
On May 24, 2011, at 11:03 AM, Josh Browning wrote: Hi Everyone, This may be a dumb question, but I can't seem to figure it out. I have 32 and 64 bit versions of R installed on my machine, and I'd really like the 64-bit version to be the default (i.e. what opens when I open up a workspace

[R] Extracting day of month from Date objects ... was Re: grep pattern

2011-05-24 Thread David Winsemius
On May 24, 2011, at 10:19 AM, Kang Min wrote: I have another question - I'd like to extract dates from a vector of -mm-dd, so I just want the dd. x <- round(runif(10)*10, digits=0) y <- as.Date(x, origin="1970-01-01") I tried this based on the code that Jim provided, but it just prin

Re: [R] help on permutation/randomization test

2011-05-24 Thread Wenjin Mao
Thank you, Michael. I don't think those data for the same group can be treated as repeated measurements. Let's say I have 1000 observations from group 1 and 1500 obs from group 2. Some of the 1000 objects of group 1 entered the system at the same time and may effect each other; same for the other

Re: [R] R in batch mode

2011-05-24 Thread Jonathan Daily
Save it anywhere that is on your search path, which can be seen by typing path into the command line. On Tue, May 24, 2011 at 12:40 PM, Muhuri, Pradip (SAMHSA/CBHSQ) wrote: > Hi Everyone, > > > > I am a new R user and trying to run R jobs in batch mode. > > > > Robert Muenchen (2009), in his book

Re: [R] Data values on graphics

2011-05-24 Thread Zeki Çatav
Sal, 2011-05-24 tarihinde 08:41 -0500 saatinde, Robert Baer yazdı: > >> zcatav wrote: > >>> > >>> How can i add data values or proportion values on bar or pie charts? > >>> > >> You can add any text or numbers to any place of a graph with this > >> command: > >>> text(45,20,"some text") > >> where

[R] seeking help on using LARS package

2011-05-24 Thread Vishal Thapar
Hi, I am writing to seek some guidance regarding using Lasso regression with the R package LARS. I have introductory statistics background but I am trying to learn more. Right now I am trying to duplicate the results in a paper for shRNA prediction "An accurate and interpretable model for siRNA ef

[R] R in batch mode

2011-05-24 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hi Everyone, I am a new R user and trying to run R jobs in batch mode. Robert Muenchen (2009), in his book "R for SAS and SPSS Users", has suggested writing a small batch file like mR.bat as shown below: "C:\Program File\R\R-2.10.0\bin\Rterm.exe" --no-restore --no-save < %1 > %1.Rout 2>&

[R] Thiessen method

2011-05-24 Thread federico.eccel
Dear users, I try to search in the web and in the R forum for any package for computing The thiessen method but I didn't find anything. I would like to ask if it exists any package in R that provides the possiblity to compute the Thiessen method for interpolating rain gauges. Thank a lot. -- Vi

[R] Opening R in 64-bit version by default

2011-05-24 Thread Josh Browning
Hi Everyone, This may be a dumb question, but I can't seem to figure it out. I have 32 and 64 bit versions of R installed on my machine, and I'd really like the 64-bit version to be the default (i.e. what opens when I open up a workspace). I've tried right-clicking on the workspace and setting t

Re: [R] Reading Data from mle into excel?

2011-05-24 Thread Bazman76
thanks for all your help I have taken a slightly different route but I think I am getting there library(plyr) #setwd("C:/Documents and Settings/Hugh/My Documents/PhD") #files<-list.files("C:/Documents and Settings/Hugh/My Documents/PhD/",pattern="Swaption Vols.csv") #vols <- lapply(files, read

[R] R - Time Series Regression with a p-value check for each additional added point.

2011-05-24 Thread Rick Dunkelberger
Hi All, Here is my sample data set.. y x 7/4/2009 -0.2368 -1.2727 7/11/2009 -0.5039 -5.2805 7/18/2009 -0.6655 -6.9641 7/25/2009 -0.3936 -3.6937 8/1/2009 -0.3463 -5.6457 8/8/2009 -0.3000 -1.7368 8/15/2009 0.2378 6.4600 8/22/2009 -0.2962 -3.1113 8/29/2009 -0.4346 -4.2039 9/5/2009 -0.6971 -7.8216 9/1

Re: [R] grep pattern

2011-05-24 Thread Kang Min
I have another question - I'd like to extract dates from a vector of -mm-dd, so I just want the dd. x <- round(runif(10)*10, digits=0) y <- as.Date(x, origin="1970-01-01") I tried this based on the code that Jim provided, but it just printed the whole date. I think I just need to tweak i

Re: [R] How do I assign boolean (o,1) values to a column?

2011-05-24 Thread Xenimes
Thank you David and Steve, Yes all this data are already in R and in csv files. Sorry for not being clear. I have this: Codes1and3[1:5,c(1:5)] Mark_2 pop Mark_1 Mark_3 age 1 P A1 139 alpha 2 2 P A1 140 alpha 2 3 P A1

Re: [R] Problem with visualization of power of t test

2011-05-24 Thread Etienne Stockhausen
Dear Richard M. Heiberger, I've some problems understanding your function. Where is the power visualized? May you give me an example including the following parameter given by  power.t.test(n = 2, sd = 1, power = 0.5,  sig.level = 0.05, type = "one.sample", alternative = "one.sided")   Thanks i

Re: [R] Loading an S object into R

2011-05-24 Thread Nutter, Benjamin
Shoot! I was really hoping this would be something not in an obvious documentation. Feel free to stamp my forehead with "One of Them" And you were right, it turned out to be a cph model. Thanks, Josh. -Original Message- From: Joshua Wiley [mailto:jwiley.ps...@gmail.com] Sent: Tuesday

Re: [R] Loading an S object into R

2011-05-24 Thread Joshua Wiley
Hi Benjamin, I also have no experience with S plus, but the suggestions on the R Import/Export manual seem worth trying: http://cran.r-project.org/doc/manuals/R-data.html#EpiInfo-Minitab-SAS-S_002dPLUS-SPSS-Stata-Systat I also question whether this is just data, words like "loglik", "iter", etc.

Re: [R] how to eliminate first row in datafile created in do loop

2011-05-24 Thread Ian Gow
Gregory: My suggestion omitted the "i.value" column you'd mentioned, but the version below includes it. Note, the row names are simpler in this variant than in yours (I assume that's where the "one.months" are showing up). > limit.list <- NULL > for(i in 1:12) { + some.data <- rnorm(2) + lo

Re: [R] Analog of least significant difference error bars for proportions

2011-05-24 Thread Richard Friedman
Dear Rolf (and List), Thank you for your help on error bars. I fear that neither of the suggestions quite answer my immediate need. 1. Notches will not work because I have more than 2 levels. 2. The errbar function will useful once I know the error bars to put in. I thing I have figu

Re: [R] how to eliminate first row in datafile created in do loop

2011-05-24 Thread Graves, Gregory
Certainly closer, and I can get by with this ... but ... would like to not have the "one.month"s . limit.list<-NULL for(i in 1:12){ s=subset(paleo,month==i); one.month=with(s, quantile(WBpaleo, c(.25, .75), na.rm=T)); one.month=c(as.character(i),one.month); limit.li

[R] Loading an S object into R

2011-05-24 Thread Nutter, Benjamin
I hope you'll all forgive me for displaying my severe lack of knowledge on this topic, and I can't really provide much in the way of reproducible code. A colleague of mine has asked if I know how to import an S object into R. The object is stored in a file named 'pre3.f' When I open the file

Re: [R] power.t.test visualization problem

2011-05-24 Thread David Winsemius
On May 24, 2011, at 8:44 AM, stocd...@mail.tu-berlin.de wrote: Dear R-User, I'm trying to visualize the results of the power calculation with the function power.t.test(). Therefore I want to plot the related t- distributions and shade the surfaces indicatingt the type I error, the type II

Re: [R] Latent class analysis, selection of the number of classes

2011-05-24 Thread Christian Hennig
Just a quick, slightly critical remark about this: the BIC and the CAIC are *by definition* pretty much the same, so it shouldn't be interpreted as some kind of additional confirmation if they point to the same number of classes, it's rather (more or less) "the same information twice". Christi

Re: [R] document

2011-05-24 Thread David Winsemius
On May 24, 2011, at 6:51 AM, rgui wrote: Hello evryone, Thank you for helping me to choose a CRAN MIRROR. When Icome to choose a mirror an error message comes: Message d'avis : In open.connection(con, "r") : connexion à 'cran.r-project.org' impossible sur le port 80. Again, I managed to

Re: [R] Latent class analysis, selection of the number of classes

2011-05-24 Thread David Joubert
I have used PoLCA for this purpose, and not the e1071 package. You should use a variety of fit indices to choose the number of classes. The BIC may not always be the best choice, depending on your sample size and frequency table. In the best case, AIC, CAIC and BIC values agree as to the optim

[R] AUTO: Hans-Peter Hafner Dr./HSL/DE ist außer Haus.

2011-05-24 Thread hhafner
Ich bin bis 30.05.2011 abwesend. Ihre Mail wird nicht weitergeleitet. Ich beantworte sie nach meiner Rückkehr. In dringenden Fällen schreiben Sie bitte an forschungsdatenzent...@statistik-hessen.de . Hinweis: Dies ist eine automatische Antwort auf Ihre Nachricht "R-help Digest, Vol 99, Issu

[R] Multivariable model

2011-05-24 Thread Luciano La Sala
Hello r-list members, I've been doing some linear modeling with a dataset structured as follows. Tubes containing 500 larvae of Trichinella each were treated with one of four different temperatures. Each day (or every 10 days depending on treatment group), 3 tubes were selected from each treatmen

Re: [R] plotting single variables common to multiple data frames

2011-05-24 Thread John Kane
None of the files came through.  The R-help list routinely srips off all attachments to cut down on the change of viri .  You could provide the data in the email by using dput.  Type ?dput in the R console to get the help page. It is not clear from what you write whether you want a line with o

Re: [R] Data values on graphics

2011-05-24 Thread Robert Baer
zcatav wrote: How can i add data values or proportion values on bar or pie charts? You can add any text or numbers to any place of a graph with this command: text(45,20,"some text") where: 45 is position on the X-axis and 20 - on the Y. Note that numbers denote the MIDDLE of the text,not its

Re: [R] Problem with visualization of power of t test

2011-05-24 Thread Richard M. Heiberger
Etienne, For this type of graph, I would use the functions in the HH package ## install.packages("HH") ## if necessary library(HH) normal.and.t.dist(std.dev=2, Use.alpha.left=FALSE, deg.free=6, mu.H1=2, Use.mu.H1=TRUE, obs.mean=2.5, Use.obs.mean=TRUE, xmin

[R] Problem with visualization of power of t test

2011-05-24 Thread Etienne Stockhausen
Dear R-User, I'm trying to visualize the results of the power calculation with the function power.t.test(). Therefore I want to plot the related t-distributions and shade the surfaces indicatingt the type I error, the type II error and the power. For sample sizes greater 30 I got results which

[R] document

2011-05-24 Thread rgui
Hello evryone, Thank you for helping me to choose a CRAN MIRROR. When Icome to choose a mirror an error message comes: >Message d'avis : In open.connection(con, "r") : connexion à 'cran.r-project.org' impossible sur le port 80. Again, I managed to download th package ttda.zip but an error messa

Re: [R] Data values on graphics

2011-05-24 Thread zcatav
Yuta Tamberg wrote: > > > zcatav wrote: >> >> How can i add data values or proportion values on bar or pie charts? >> > You can add any text or numbers to any place of a graph with this command: >> text(45,20,"some text") > where: 45 is position on the X-axis and 20 - on the Y. Note that numbe

[R] power.t.test visualization problem

2011-05-24 Thread stocdarf
Dear R-User, I'm trying to visualize the results of the power calculation with the function power.t.test(). Therefore I want to plot the related t-distributions and shade the surfaces indicatingt the type I error, the type II error and the power. For sample sizes greater 30 I got results

Re: [R] Get contour of a map

2011-05-24 Thread Pierre Bruyer
Yes sure! I understand english very well but I am not very good when I wrote, so I try to don't write too nonsense. I have post a precedent topic about that but no one have find a response for the ensemble of the problem. So, I would like to create a raster for a map in R. I have a dataset with

[R] plotting single variables common to multiple data frames

2011-05-24 Thread Mathew Brown
Hello all, I have files (see attached) which are created daily. I want to load about a weeks worth of them (7 daily files) and plot a weeks worth of one variable together. So one variable name is delta_D_H. I would like to plot this variable from all 7 days on one plot. I'm having trouble figu

[R] (no subject)

2011-05-24 Thread Ernest Koji
SVP: puisje avoir les exercices proposées sur R en biostat Merci ___ KOJI ERNEST Hydrobiologiste/Environnementaliste Université de Yaoundé I-Cameroun S/C Facultés des Sciences B.P 812 E-mail: kojiairn...@yahoo.fr Tel :(237) 74-33-44-57 [[alternative HTML version deleted]] __

[R] how to calculate AVE and factor-reability?

2011-05-24 Thread Ina Probst
Hello, I am doing a confirmatory factor analysis with package Lavaan. My model consists of 5 factors and I would like to calculate the factor-reliability and the average variance extracted (AVE) for every factor. What function can I use to receive this measures? The Lavaan Package doesn't have

Re: [R] how to eliminate first row in datafile created in do loop

2011-05-24 Thread Ian Gow
Gregory: Would setting limit.list <- NULL at the start do the trick? See example below: Analogue of your example: lower <- 0 upper <- 0 limit.list<-data.frame(lower,upper) for(i in 1:12) { some.data <- rnorm(2) lower <- min(some.data) upper <- max(some.data) one.month <- data.frame(low

[R] how to eliminate first row in datafile created in do loop

2011-05-24 Thread Graves, Gregory
I am trying to create a routine that would take a time series and generate monthly 25%tile and 75%tile limits based on 12 calendar months. I have succeeded to create a do loop to do this, but can't figure out how to initiate the receiving datafile (in this case "limit.list") without sticking an ini

Re: [R] Latent class analysis, selection of the number of classes

2011-05-24 Thread Christian Hennig
Dear Daniel, the BIC can be used to estimate the number of classes. This is actually given out by lca, so you could run lca with several different k and pick the solution that gives you the best BIC. Unfortunately I can't tell you whether "large is good" or "small is good" for the BIC implemen

Re: [R] Interpreting the results of the zero inflated negative binomial regression

2011-05-24 Thread Ben Bolker
Vishnu B gmail.com> writes: > I am new to R and has been depending mostly on the online tutotials to learn > R. I have to deal with zero inflated negative binomial distribution. I am > however unable to understand the following example from this link > http://www.ats.ucla.edu/stat/r/dae/zinbreg.h

  1   2   >