Re: [R] Bar Plots: Error Bars

2009-12-03 Thread Jeremy Baxter
Brett Hi Searching http://www.Rseek.org will return many similar results. You might find the following useful in terms of your question re aligning the bars: http://users.fmg.uva.nl/rgrasman/rpages/2005/09/error-bars-in-plots.html The discussion on this page also refers to the errbar function

Re: [R] Normal tests disagree?

2009-12-03 Thread GlenB
rkevinburton wrote: If I have data that I feed into shapio.test and jarque.bera.test yet they seem to disagree. What do I use for a decision? For my data set I have p.value of 0.05496421 returned from the shapiro.test and 0.882027 returned from the jarque.bera.test. I have included the

Re: [R] Replying to Posts Within Same Thread

2009-12-03 Thread Charlotte Maia
On Thu, Dec 3, 2009 at 1:15 AM, Ted Harding ted.hard...@manchester.ac.uk wrote: There is an issue which does not seem to have been raised yet in this thread. In her original post, Charlotte Maia said she was receiving messages in Digest form. There are two Digest options: Get MIME or Plain

Re: [R] Help: barchart() {Lattice}

2009-12-03 Thread Deepayan Sarkar
On Thu, Dec 3, 2009 at 10:02 AM, Felix Andrews fe...@nfrac.org wrote: Either (1) use the 'alternating' option rather than 'relation' (see documentation for 'scales' argument); or (2) put 'rot' inside the 'y' list if you want it to apply only to the y axis. Or you can have scales = list(y =

Re: [R] Bar Plots: Error Bars

2009-12-03 Thread bshan101
Thanks so much! And those links are really useful :) brett Jeremy Baxter wrote: Brett Hi Searching http://www.Rseek.org will return many similar results. You might find the following useful in terms of your question re aligning the bars:

[R] How build hist combining data

2009-12-03 Thread Trafim Vanishek
I would like to ask if there is some simple way for building a hist from the following data. mm -c(2,3,0,4,5,0,2,9,0) mmm - matrix(mm,ncol=3, nrow=3) x - c(0,1.45,2.9) in mmm there are frequencies (each column is separate histogram and each row corresponds to value of x). So that for the first

[R] How to check if file is on a drive?

2009-12-03 Thread Sergey Goriatchev
Hello, everyone How would I check in R if a particular file (Excel file) is in a particular folder on a particular drive? I am writing a piece of code around that file, using xls.open() in xlsReadWritePro to open the file in memory and use it. But before I try to open the file I want to catch the

Re: [R] How to check if file is on a drive?

2009-12-03 Thread Romain Francois
?file.exists On 12/03/2009 11:31 AM, Sergey Goriatchev wrote: Hello, everyone How would I check in R if a particular file (Excel file) is in a particular folder on a particular drive? I am writing a piece of code around that file, using xls.open() in xlsReadWritePro to open the file in memory

Re: [R] Avoiding singular fits in rlm

2009-12-03 Thread Peter Ehlers
Matt Crawford wrote: I keep coming back to this problem of singular fits in rlm (MASS library), but cannot figure out a good solution. I am fitting a linear model with a factor variable, like lm( Y ~ factorVar) and this works fine. lm knows to construct the contrast matrix the way I would

Re: [R] Bar Plots: Error Bars

2009-12-03 Thread Jose Gaspar Macia Vicente
Hi Brett, have you tried the function errbar, within the library Hmisc? It works pretty well for barplots. You have to specify the coordinates where error bars start (x and y), end then the ending points they end (yminus=y-error and yplus=y+error). The plotting function barplot2 within the

Re: [R] How to check if file is on a drive?

2009-12-03 Thread Sergey Goriatchev
Great! Thank you, Romain! On Thu, Dec 3, 2009 at 11:33, Romain Francois romain.franc...@dbmail.com wrote: ?file.exists On 12/03/2009 11:31 AM, Sergey Goriatchev wrote: Hello, everyone How would I check in R if a particular file (Excel file) is in a particular folder on a particular drive?

Re: [R] R help with princomp and pam clustering

2009-12-03 Thread Joris Meys
Hi Tyler, sorry, I missed your response. Don't know if it's solved already, but some remarks. the predict uses a princomp object, so your second command should work. I guess the problem is either the data format of B (should contain exactly the same amount of columns, with the same names), or

Re: [R] median for time data

2009-12-03 Thread uvilla
Hi again. I´m sorry to ask again but I cannot do the boxplot coprrectly. I'm typing: start.posix=as.POSIXct(skiers[,3]) boxplot(start.posix) where skiers[,3] is my time data, and I get this error I have no idea of what that means.. All the other steps are ready, like the median of the time

[R] Can we get rid of bar charts with error bars?

2009-12-03 Thread Frank E Harrell Jr
Bar charts with error bars are far inferior to dot charts and other types of displays. One of many problems is demonstrated if you draw a bar chart displaying temperature in F then re-draw it on the degrees C scale. See http://biostat.mc.vanderbilt.edu/DynamitePlots for much more

[R] data manipulation

2009-12-03 Thread oscar linares
Dear Wiza[R]ds, I have a data.frame header that looks like this: v2FfaPre15v2FfaPre10v2FfaPre5v2Ffa2v2Ffa3v2Ffa4 I need it to look like this, 1510523 4 i.e., with v2FfaPre and v2Ffa stripped off Any suggestions, Thanks in advance! -- Oscar Oscar A.

Re: [R] data manipulation

2009-12-03 Thread jim holtman
try this: x - c('v2FfaPre15','v2FfaPre10','v2FfaPre5','v2Ffa2', 'v2Ffa3','v2Ffa4') sub(^.*?([0-9]+)$, \\1, x, perl=TRUE) [1] 15 10 5 2 3 4 On Thu, Dec 3, 2009 at 9:00 AM, oscar linares wins...@gmail.com wrote: Dear Wiza[R]ds, I have a data.frame header that looks

Re: [R] data manipulation

2009-12-03 Thread Henrique Dallazuanna
Try this: gsub(.*[^0-9], , header) On Thu, Dec 3, 2009 at 12:00 PM, oscar linares wins...@gmail.com wrote: Dear Wiza[R]ds, I have a data.frame header that looks like this: v2FfaPre15    v2FfaPre10    v2FfaPre5    v2Ffa2    v2Ffa3    v2Ffa4 I need it to look like this, 15    10    5    

[R] XML - ampersand escaped

2009-12-03 Thread Ido M. Tamir
Hi, I create some DOM with XML and would like to include cap; in the text of an element. The library automatically escapses it to amp;cap;. unescaping \\cap; does not help. any ideas? My current plan is to go through the output and replace it with gsub, but maybe there is a better way? thanks,

[R] adding bmp/jpg/gif to an existing plot

2009-12-03 Thread Cézar Freitas
Hi, all. I searched a lot at mailing list, installed EBImage and gtk packages, but I couldn't make this simple work: How to add a image file (jpg or bmp ou gif) to an existing plot window (not plot over the image), like the code below (pseudo function add.image): plot(1:10,1:10,main=test)

Re: [R] data manipulation

2009-12-03 Thread Gabor Grothendieck
Try this where [0-9]+ matches one or more digits and $ matches the end of string. See http://gsubfn.googlecode.com for more. library(gsubfn) x - c(v2FfaPre15, v2FfaPre10, v2FfaPre5, v2Ffa2, v2Ffa3, v2Ffa4) strapply(x, [0-9]+$, c, simplify = TRUE) # or if you want a numeric result: strapply(x,

[R] Acumulate assign on lapply list

2009-12-03 Thread KENNETH R CABRERA
Hi R users: f1-function(l1,idx){   f2-function(i,l1)   l1[[i+1]]-c(l1[[i]],l1[[i+1]][-1])   lapply(idx,f2,l1)   return(l1) } l-list(c(1,2,3),c(4,5),c(6,7,8)) l2-f1(l,1:(length(l)-1)) l2 I got: [[1]] [1] 1 2 3 [[2]] [1] 1 2 3 5 [[3]] [1] 4 5 7 8 But what I want in the last position of l2

Re: [R] Can we get rid of bar charts with error bars?

2009-12-03 Thread Heinz Tuechler
Frank, the example on http://biostat.mc.vanderbilt.edu/DynamitePlots is nice, and I agree with you. Just one minor question: would it be possible to mention as An article with nice dot plots a paper, which is freely available? Heinz At 14:56 03.12.2009, Frank E Harrell Jr wrote: Bar charts

Re: [R] adding bmp/jpg/gif to an existing plot

2009-12-03 Thread Prof Brian Ripley
Look at the R-devel development version of R o The graphics engine now supports rendering of raster (bitmap) images, though not all graphics devices can provide (full) support. Packages providing graphics devices (e.g., Cairo, RSvgDevice, cairoDevice) will need to

[R] Formatting of numbers on y axis

2009-12-03 Thread Wells Oliver
Hello all. I have the following: plot(salaries$yearID, salaries$salary, type='n', xaxt='n', xlab='', yaxt='n', ylab='') axis(1, at=unique(salaries$yearID), labels=unique(salaries$yearID), lwd=.25, tck=-0.05) axis(2, axTicks(2), format(axTicks(2), scientific = F)) Which nicely creates the Y axis

[R] online.QTAFI: Online questionnaire environment (R supported)

2009-12-03 Thread bhina patria
R-help@r-project.orgDear lister, I am delighted to introduce you to an open souce software to make online survey/questionnaire. online.QTAFI has been developed by Martin Guist in INCHER-Kassel since 2003. The questionnaire data are also available to download in R script. More about online.QTAFI

Re: [R] documentation of intersect() on string vector and num vector and on duplicated elements

2009-12-03 Thread Greg Snow
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of David Winsemius Sent: Wednesday, December 02, 2009 3:25 PM To: Peng Yu Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] documentation of intersect() on string vector and num

[R] Replace values in a vector

2009-12-03 Thread Farida Mostajabi
Hi all, I have a vector like this: x- c(0.7, 0.1, 0, 0.2, 0.2, 0, 0, 0 , 0, 0.4, 0, 0.8, 1.8) I would like to replace the zero values with the first previous non zero value. my returning vector should look like this: y-c( 0.7, 0.1, 0.1,0.2,0.2,0.2,0.2,0.2, 0.4, 0.4, 0.8, 1.8) How can I do

[R] S4 Classes, nested objects and references

2009-12-03 Thread Joris Meys
Hi all, I'm currently programming my first complete package in S4. (thanks to Christophe Genolini for the nice introduction he wrote). I have an object Data with a number of slots. One of those slots is meteo. Now Meteo is on itself a class with again a number of slots (like rainfall,

Re: [R] Replace values in a vector

2009-12-03 Thread Gabor Grothendieck
na.locf in the zoo package takes the last occurrence and carries it forward into NAs so replace your zeros with NAs and then apply na.locf like this: library(zoo) na.locf(replace(x, x==0, NA)) On Thu, Dec 3, 2009 at 11:41 AM, Farida Mostajabi f0mos...@louisville.eduwrote: Hi all, I

Re: [R] (Grouped + Stacked) Barplot

2009-12-03 Thread Greg Snow
A bar graph including both stacked and grouped bars will put lots of pretty colors on the page and probably be eyecatching, but is unlikely to be the most effective way to convey the actual meaning of the data. I would recommend that you explore other possibilities for doing the plot. A dot

Re: [R] Formatting of numbers on y axis

2009-12-03 Thread Joris Meys
The problem is easily solved by plotting salaries$salary/100 Cheers Joris On Thu, Dec 3, 2009 at 5:16 PM, Wells Oliver we...@submute.net wrote: Hello all. I have the following: plot(salaries$yearID, salaries$salary, type='n', xaxt='n', xlab='', yaxt='n', ylab='') axis(1,

[R] par() background issue

2009-12-03 Thread Wells Oliver
I have the following: par(bg='#CC', family='Lucida Grande') plot(salaries$yearID, salaries$salary/100) Which creates a graph with the correct offwhite/yellow background. However, I want the actual plot box to have a white background. par(bg='#CC', family='Lucida Grande')

Re: [R] Replace values in a vector

2009-12-03 Thread Farida Mostajabi
WOW! It worked. Thank you! Gabor Grothendieck ggrothendi...@gmail.com 12/03/09 11:46 AM na.locf in the zoo package takes the last occurrence and carries it forward into NAs so replace your zeros with NAs and then apply na.locf like this: library(zoo) na.locf(replace(x, x==0, NA)) On

Re: [R] Acumulate assign on lapply list

2009-12-03 Thread Charles C. Berry
On Thu, 3 Dec 2009, KENNETH R CABRERA wrote: Hi R users: f1-function(l1,idx){ ? f2-function(i,l1)?? l1[[i+1]]-c(l1[[i]],l1[[i+1]][-1]) ? lapply(idx,f2,l1) ? return(l1) } l-list(c(1,2,3),c(4,5),c(6,7,8)) l2-f1(l,1:(length(l)-1)) l2 I got: [[1]] [1] 1 2 3 [[2]] [1] 1 2 3 5 [[3]] [1] 4 5 7

Re: [R] Replace values in a vector

2009-12-03 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Farida Mostajabi Sent: Thursday, December 03, 2009 8:41 AM To: r-help@r-project.org Subject: [R] Replace values in a vector Hi all, I have a vector like this: x- c(0.7,

Re: [R] adding bmp/jpg/gif to an existing plot

2009-12-03 Thread Greg Snow
Look at the subplot function in the TeachingDemos package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of

Re: [R] adding bmp/jpg/gif to an existing plot

2009-12-03 Thread Frank E Harrell Jr
Greg Snow wrote: Look at the subplot function in the TeachingDemos package. A copy of subplot is in the Hmisc package thanks to Greg. -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University

Re: [R] Replace values in a vector

2009-12-03 Thread Farida Mostajabi
Yes, should be 6 0.2. The code worked. Thank you! William Dunlap wdun...@tibco.com 12/03/09 12:07 PM -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Farida Mostajabi Sent: Thursday, December 03, 2009 8:41 AM To:

Re: [R] median for time data

2009-12-03 Thread Jannis
I fear nobody can really help you as we can not really understandd what your problem is. What does the error message read? What values does start.posix have? And what skiers? You should include the code for a reproducable example. include at least 2 values for skiers[,3] in their correct

[R] adding bmp/jpg/gif to an existing plot

2009-12-03 Thread Cézar Freitas
Hi, all. I searched a lot at mailing list, installed EBImage and gtk packages, but I couldn't make this simple work: How to add a image file (jpg or bmp ou gif) to an existing plot window (not plot over the image), like the code below (pseudo function add.image): plot(1:10,1:10,main=test) image =

[R] Problem with predict() and factors

2009-12-03 Thread Idgarad
I am working on a script that takes numeric performance indicators and runs them against a series of regressors (dummy regressors, yes\no stuff via 0 and 1, e.g. Was is Christmas this week 0=no, 1=yes). The script is as follows (Written as a function): -- Begin Script -- doEnv -

Re: [R] Data frame/read.ftable

2009-12-03 Thread Robinson, David G
David, Great! 'split' is something I didn't even look at. Owe you one. Many thanks, Dave On 12/2/09 7:29 PM, David Winsemius dwinsem...@comcast.net wrote: On Dec 2, 2009, at 7:02 PM, Robinson, David G wrote: My apologies for this question but I'm stuck and I'm sure that there must be an

[R] count number of empty cells in a table/matrix/data.frame

2009-12-03 Thread maiya
Hi everyone! This is a ridiculously simple problem, I just can't seem to find the solution! All I need is something equivalent to sum(is.na(x)) but instead of counting missing values, to count empty cells (with a value of 0). A naive attempt with is.empty didn't work :) Thanks! Maja Oh,

Re: [R] How to export a function from a package and access it only by specifying the namespace?

2009-12-03 Thread Henric (Nilsson) Winell
On 2009-12-02 16:31, Peng Yu wrote: On Tue, Dec 1, 2009 at 11:27 PM, Sharpie ch...@sharpsteen.net wrote: Peng Yu wrote: Then I try the package 'try.package' in an R session. I'm wondering why neither 'my_test_f' and 'try.package::my_test_f' work. The error message you got below clearly

[R] distance matrices

2009-12-03 Thread Omar Gonzalez Post
i'm working on some distance matrices and i was wondering if there is a way to export the matrices from R to excel. OG thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Three-dimensional (3D) movement using 'R'

2009-12-03 Thread StRose, Suzanne
Hi Everyone, I have a question regarding the construction of 3D graphs in 'R', BUT these graphs also need to illustrate movement (with time) of the prostate gland (using radiological techniques). I am not sure how to do this in 'R' although I'm sure there is some way of doing it. Below,

[R] GLM Question

2009-12-03 Thread Knut Krueger
Hi to all I think this is more an general question to GLMs. The result was better in all prior GLMs when I admitted the non significant factors, but this is the first time that the result is worse than before. What could be the reason for that?

Re: [R] distance matrices

2009-12-03 Thread Gavin Simpson
On Thu, 2009-12-03 at 11:06 -0700, Omar Gonzalez Post wrote: i'm working on some distance matrices and i was wondering if there is a way to export the matrices from R to excel. OG thanks If 'dij' is your dissimilarity matrix as a 'dist' object (special lower triangular representation) then

Re: [R] Structural Equation Models(SEM)

2009-12-03 Thread Ralf Finne
Thank you Jeremy for your information. The world is changing though. We live in an increasing economic pressure. One symptom is that we are forced to use smaller samples for economy. This explains the interest for research in how the methods perform on small samples. The cited large simulation

Re: [R] count number of empty cells in a table/matrix/data.frame

2009-12-03 Thread Greg Snow
If you only want to count cells that are exactly 0.0 (not slightly different due to rounding errors) then try: sum( x==0 ) If you want a little wiggle room for rounding error, then you can try something like: sum( -0.001 x x 0.001 ) Adjusting the number of 0's as you see fit.

Re: [R] GLM Question

2009-12-03 Thread Peter Flom
Knut Krueger r...@krueger-family.de wrote I think this is more an general question to GLMs. The result was better in all prior GLMs when I admitted the non significant factors, but this is the first time that the result is worse than before. What could be the reason for that?

Re: [R] Help R2WinBUGS

2009-12-03 Thread Uwe Ligges
TTsai wrote: Hello, I have problem running WinBUGS from R. The following example works in WinBUGS but it does not work in R through package R2WinBUGS. Works for me. What is the error message you get? Best wishes, Uwe Ligges Does anyone know what the problem is? x - c(0.2, 1.1, 1,

Re: [R] Three-dimensional (3D) movement using 'R'

2009-12-03 Thread David Winsemius
On Dec 3, 2009, at 7:59 AM, StRose, Suzanne wrote: Hi Everyone, I have a question regarding the construction of 3D graphs in 'R', BUT these graphs also need to illustrate movement (with time) of the prostate gland (using radiological techniques). I am not sure how to do this in 'R'

Re: [R] Three-dimensional (3D) movement using 'R'

2009-12-03 Thread Duncan Murdoch
On 03/12/2009 7:59 AM, StRose, Suzanne wrote: Hi Everyone, I have a question regarding the construction of 3D graphs in 'R', BUT these graphs also need to illustrate movement (with time) of the prostate gland (using radiological techniques). I am not sure how to do this in 'R' although I'm

[R] Two-way/Three-way sum.

2009-12-03 Thread Peng Cai
Hi R Users, I'm wondering how can I calculate two (or three) way sum of a variable. A sample data is: State Month Year Value NC Jan 1996 1 NC Jan 1996 2 NC Feb 1997 2 NC Feb 1997 3 NC Mar 1998 3 NC Mar 1998 4 NY Jan 1996 4 NY Jan 1996 5 NY Feb 1997 5 NY Feb 1997 6 NY Mar 1998 6 NY Mar 1998 7

Re: [R] Two-way/Three-way sum.

2009-12-03 Thread Greg Snow
?tapply -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Peng Cai Sent: Thursday, December 03, 2009 11:50 AM

Re: [R] Two-way/Three-way sum.

2009-12-03 Thread jim holtman
try this: x State Month Year Value 1 NC Jan 1996 1 2 NC Jan 1996 2 3 NC Feb 1997 2 4 NC Feb 1997 3 5 NC Mar 1998 3 6 NC Mar 1998 4 7 NY Jan 1996 4 8 NY Jan 1996 5 9 NY Feb 1997 5 10NY Feb 1997

Re: [R] Two-way/Three-way sum.

2009-12-03 Thread Jorge Ivan Velez
Hi Peng, Here is a suggestion using tapply: R with(x, tapply(Value, list(State, Month), FUN = sum)) R with(x, tapply(Value, list(State, Year), FUN = sum)) R with(x, tapply(Value, list(State, Year, Month), FUN = sum)) with 'x' your data set. Please take a look at ?tapply for more information.

Re: [R] Two-way/Three-way sum.

2009-12-03 Thread Peng Cai
Thanks Greg, Jorge, and Jim for your help. Peng On Thu, Dec 3, 2009 at 1:58 PM, jim holtman jholt...@gmail.com wrote: try this: x State Month Year Value 1 NC Jan 1996 1 2 NC Jan 1996 2 3 NC Feb 1997 2 4 NC Feb 1997 3 5 NC Mar 1998 3

Re: [R] Two-way/Three-way sum.

2009-12-03 Thread David Winsemius
On Dec 3, 2009, at 1:50 PM, Peng Cai wrote: Hi R Users, I'm wondering how can I calculate two (or three) way sum of a variable. A sample data is: State Month Year Value NC Jan 1996 1 NC Jan 1996 2 NC Feb 1997 2 NC Feb 1997 3 NC Mar 1998 3 NC Mar 1998 4 NY Jan 1996 4 NY Jan 1996 5 NY Feb

Re: [R] Two-way/Three-way sum.

2009-12-03 Thread Peng Cai
Thanks David for your suggestions. On Thu, Dec 3, 2009 at 2:03 PM, David Winsemius dwinsem...@comcast.netwrote: On Dec 3, 2009, at 1:50 PM, Peng Cai wrote: Hi R Users, I'm wondering how can I calculate two (or three) way sum of a variable. A sample data is: State Month Year Value NC

Re: [R] Two-way/Three-way sum.

2009-12-03 Thread Peng Cai
Also, can I control for number of decimal places printed. Like when I use mean function. By default it shows upto 7 dec. Thanks! On Thu, Dec 3, 2009 at 2:08 PM, Peng Cai pengcaimaill...@gmail.com wrote: Thanks David for your suggestions. On Thu, Dec 3, 2009 at 2:03 PM, David Winsemius

[R] how to use different ylim scales on a lattice bwplot?

2009-12-03 Thread Steve_Friedman
A colleague is interested in modifying the ylim definition for individual panels of a common bwplot plotting statement. Is there an approach to modifying the bwplot function to allow for a dynamic ylim range given different panel factors ? He is using R 2.6.2 on a Linux distribution running

Re: [R] Two-way/Three-way sum.

2009-12-03 Thread David Winsemius
On Dec 3, 2009, at 2:14 PM, Peng Cai wrote: Also, can I control for number of decimal places printed. Like when I use mean function. By default it shows upto 7 dec. Thanks! print(4.567891234, digits=3) [1] 4.57 On Thu, Dec 3, 2009 at 2:08 PM, Peng Cai pengcaimaill...@gmail.com

Re: [R] Two-way/Three-way sum.

2009-12-03 Thread Peng Cai
Thanks again! On Thu, Dec 3, 2009 at 2:19 PM, David Winsemius dwinsem...@comcast.netwrote: On Dec 3, 2009, at 2:14 PM, Peng Cai wrote: Also, can I control for number of decimal places printed. Like when I use mean function. By default it shows upto 7 dec. Thanks! print(4.567891234,

Re: [R] R and eclipse

2009-12-03 Thread Gene Leynes
I thought of your email when I ran across this link: http://romainfrancois.blog.free.fr/index.php?post/2009/09/02/R-capable-version-of-ant I think that you would have word your question more carefully for a longer response. Also, I use StatEt almost everyday. It works great with R. I have not

[R] Dataframe help

2009-12-03 Thread Ramya
Hi there I have two dataframes Dataframe_1 column_1colum_2 121 12345 145 1675 167 2765 Dataframe_2 column_1 column2 121abc 345lmn 167efg I want a resulting dataframe 121 12345abc 167 2765 efg how do i go abt it Ramya --

Re: [R] Dataframe help

2009-12-03 Thread David Winsemius
On Dec 3, 2009, at 2:47 PM, Ramya wrote: Hi there I have two dataframes Dataframe_1 column_1colum_2 121 12345 145 1675 167 2765 Dataframe_2 column_1 column2 121abc 345lmn 167efg I want a resulting dataframe 121 12345abc 167

[R] matrix data appears corrupted.. appears to be pairs of decimal numbers glommed together

2009-12-03 Thread Stephen Grubb
Hello, We are occasionally getting matrix results that appear to be corrupted... here are the last several rows of an example, copy-pasted out of the R command window. These are supposed to be floating point numbers. [25015,] 1.820848e-01-3.2090e-06i [25016,] 2.178046e-01-4.8140e-06i

Re: [R] Dataframe help

2009-12-03 Thread Peng Cai
Try this: both - merge(left, right, by.x=column1, by.y=column1) left dataset column1column2 121 12345 145 1675 167 2765 right datset column1 column3 121abc 345lmn 167efg HTH, Peng On Thu, Dec 3, 2009 at 2:47 PM, Ramya ramya.vict...@gmail.com wrote:

Re: [R] matrix data appears corrupted.. appears to be pairs of decimal numbers glommed together

2009-12-03 Thread David Winsemius
On Dec 3, 2009, at 3:02 PM, Stephen Grubb wrote: Hello, We are occasionally getting matrix results that appear to be corrupted... here are the last several rows of an example, copy- pasted out of the R command window. These are supposed to be floating point numbers. [25015,]

Re: [R] Dataframe help

2009-12-03 Thread Ramya
Thanks it worked!!! i was trying to use %in% and matching it. Ramya On Thu, Dec 3, 2009 at 2:06 PM, Peng Cai [via R] ml-node+947950-541874...@n4.nabble.comml-node%2b947950-541874...@n4.nabble.com wrote: Try this: both - merge(left, right, by.x=column1, by.y=column1) left dataset

Re: [R] count number of empty cells in a table/matrix/data.frame

2009-12-03 Thread maja zaloznik
Thanks everyone who bothered to reply... I'm in the middle of a working binge and my brain is clearly fried if I wasn't able to figure that one out! Time to take a break... m. 2009/12/3 Greg Snow greg.s...@imail.org If you only want to count cells that are exactly 0.0 (not slightly different

Re: [R] S4 Classes, nested objects and references

2009-12-03 Thread Martin Morgan
Joris Meys wrote: Hi all, I'm currently programming my first complete package in S4. (thanks to Christophe Genolini for the nice introduction he wrote). I have an object Data with a number of slots. One of those slots is meteo. Now Meteo is on itself a class with again a number of slots

Re: [R] documentation of intersect() on string vector and num vector and on duplicated elements

2009-12-03 Thread Peter Ehlers
Greg Snow wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of David Winsemius Sent: Wednesday, December 02, 2009 3:25 PM To: Peng Yu Cc: r-h...@stat.math.ethz.ch Subject: Re: [R] documentation of intersect() on string vector

[R] Data Manipulation Question

2009-12-03 Thread John Filben
Can R support data manipulation programming that is available in the SAS datastep?  Specifically, can R support the following: -          Read multiple dataset one record at a time and compare values from each; then base on if-then logic write to multiple output files -        

Re: [R] Data Manipulation Question

2009-12-03 Thread hadley wickham
On Thu, Dec 3, 2009 at 3:52 PM, John Filben johnfil...@yahoo.com wrote: Can R support data manipulation programming that is available in the SAS datastep?  Specifically, can R support the following: -  Read multiple dataset one record at a time and compare values from each; then base

Re: [R] Data Manipulation Question

2009-12-03 Thread Jason Morgan
Please refrain from posting HTML. The results can be incomprehensible: On 2009.12.03 13:52:09, John Filben wrote: Can R support data manipulation programming that is available in the SAS datastep??? Specifically, can R support the following: -?? Read multiple dataset one

[R] dataset index

2009-12-03 Thread Lisa
Hello, All, I have a dataset that looks like this: x - matrix(c( 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1), ncol = 5, byrow = T, dimnames = list(1:10, c(gender, race, disease))) I want to write a function to produce several matrices including

[R] Question about R Functions

2009-12-03 Thread Stephanie Cooke
Is there a place to find the code for R functions like lsoda? Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

Re: [R] dataset index

2009-12-03 Thread jim holtman
Does this do what you want: x - matrix(c( + 0, 0, 0, + 0, 0, 0, + 0, 1, 0, + 0, 1, 0, + 0, 1, 0, + 1, 2, 1, + 1, 2, 1, + 1, 3, 1, + 1, 3, 1, + 1, 3, 1), + ncol = 3, byrow = T, + dimnames = list(1:10, c(gender, race, disease))) key - apply(x, 1, paste, collapse=:) m.flags - lapply(unique(key),

[R] Revolutions blog: November roundup

2009-12-03 Thread David M Smith
I write about R every weekday at the Revolutions blog: http://blog.revolution-computing.com . In case you missed them, here are some articles from last month of particular interest to R users. http://bit.ly/un680 demonstrated reader Paul Bleicher's code for visualizing a time series as a

[R] Scraping a web page

2009-12-03 Thread Michael Conklin
I would like to be able to submit a list of URLs of various webpages and extract the content i.e. not the mark-up of those pages. I can find plenty of examples in the XML library of extracting links from pages but I cannot seem to find a way to extract the text. Any help would be greatly

Re: [R] Question about R Functions

2009-12-03 Thread Ista Zahn
Yep! just do RSiteSeqarch(lsoda) -Ista On Thu, Dec 3, 2009 at 5:26 PM, Stephanie Cooke cooke.stepha...@gmail.com wrote: Is there a place to find the code for R functions like lsoda? Thanks __ R-help@r-project.org mailing list

Re: [R] Question about R Functions

2009-12-03 Thread David Winsemius
http://search.r-project.org/cgi-bin/namazu.cgi?query=lsodamax=100result=normalsort=scoreidxname=functionsidxname=Rhelp08idxname=views On Dec 3, 2009, at 5:26 PM, Stephanie Cooke wrote: Is there a place to find the code for R functions like lsoda? Thanks

Re: [R] how to use different ylim scales on a lattice bwplot?

2009-12-03 Thread Felix Andrews
You can define a custom prepanel function: see the entry for 'prepanel' in ?xyplot If you just want to set specified ylims in each panel, you can do that by passing a list to 'ylim'. 2009/12/4 steve_fried...@nps.gov: A colleague is interested in modifying the ylim definition for individual

Re: [R] dataset index

2009-12-03 Thread Charles C. Berry
On Thu, 3 Dec 2009, Lisa wrote: Hello, All, I have a dataset that looks like this: x - matrix(c( 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1), ncol = 5, byrow = T, dimnames = list(1:10, c(gender, race, disease))) I want to write a function to

[R] Please help with AR(2)

2009-12-03 Thread PeterS
I need help in interpreting AR(2) model which is of a form y=phi2(t-2)+e... I can't get past the fact that phi1 is missing -does it mean that phi1 = 0? why would that be a case? Thank you all in advance! -- View this message in context:

Re: [R] Arules - Association Rules

2009-12-03 Thread Alexandre Shimada
Hi I'm a windows XP user. My notebook have 1gb ram, 160gb hd, processor amd turion64 1,6gh. For processing, it takes about 40 minutes. This is the code i used: dados=read.csv(C:/Documents and Settings/Administrador/Meus documentos/My Dropbox/Estatística/Association Rules/Top2009 alterado.csv,

Re: [R] Arules - Association Rules

2009-12-03 Thread Alexandre - UEL
Hi I'm a windows XP user. My notebook have 1gb ram, 160gb hd, processor amd turion64 1,6gh. For processing, it takes about 40 minutes. This is the code i used: dados=read.csv(C:/Documents and Settings/Administrador/Meus documentos/My Dropbox/Estatística/Association Rules/Top2009 alterado.csv,

[R] Tobit model fluid milk consumption

2009-12-03 Thread mrsilva
Hi all, I'm from Brazil. I fit a Tobit model to FLUID MILK CONSUMPTION (DEPENDENT VARIABLE) data using survreg (attached). I am confused about the output interpretation and I would like yours explanations. Thanks, Marcio Roberto Silva Tobit model.pdf Description: Adobe PDF document

[R] corrupted matrix data.. sporadic result appears to be pairs of decimal numbers glommed together

2009-12-03 Thread Stephen Grubb
Hello, We are occasionally getting matrix results that appear to be corrupted... here are the last several rows of an example. These are supposed to be floating point numbers. [25015,] 1.820848e-01-3.2090e-06i [25016,] 2.178046e-01-4.8140e-06i [25017,] 1.820848e-01-3.2090e-06i [25018,]

Re: [R] Multiple grouping on the X axis.

2009-12-03 Thread Munin
This looks like exactly what I was looking for, except I forgot to mention that they are looking for box-plots. Any ideas on a package that can do the same kind of organization but with box-plots? Jim Lemon wrote: Hi Munin, Look at hierobarp in the plotrix package. The current version

[R] Question about R Functions

2009-12-03 Thread Stephanie Cooke
Is there a place to find the code for R functions like lsoda? Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

Re: [R] dataset index

2009-12-03 Thread Lisa
Thank you for your help. Your script works very well. Lisa jholtman wrote: Does this do what you want: x - matrix(c( + 0, 0, 0, + 0, 0, 0, + 0, 1, 0, + 0, 1, 0, + 0, 1, 0, + 1, 2, 1, + 1, 2, 1, + 1, 3, 1, + 1, 3, 1, + 1, 3, 1), + ncol = 3, byrow = T, + dimnames = list(1:10,

Re: [R] corrupted matrix data.. sporadic result appears to be pairs of decimal numbers glommed together

2009-12-03 Thread jim holtman
Those appear to be complex numbers; some place in your script you must be computing something that return a complex number. Do an str on the matrix to see what it says; see if it says this: x.1 [,1] [,2] [1,] 0.1820848-0.032i 0.1820848-0.032i [2,]

Re: [R] Scraping a web page

2009-12-03 Thread Gabor Grothendieck
If you only need to grab text it can be conveniently done with lynx. This example is for Windows but its nearly the same on other platforms: out - shell(lynx.bat --dump --nolist http://www.google.com;, intern = TRUE) head(out) [1] [2]Web Images Videos Maps News Books Gmail more » [3]

[R] Off topic - Compendium of distributions

2009-12-03 Thread Francisco J. Zagmutt
This is not an R related posting but I thought it would be interesting for readers of this list. Apologies for any cross-posting Dear all Our company Vose Software has just made a very comprehensive “Compendium of Distributions” available for free online at

Re: [R] Scraping a web page

2009-12-03 Thread Sharpie
Michael Conklin wrote: I would like to be able to submit a list of URLs of various webpages and extract the content i.e. not the mark-up of those pages. I can find plenty of examples in the XML library of extracting links from pages but I cannot seem to find a way to extract the text. Any

[R] Passing arguments to gpar

2009-12-03 Thread Sebastien Bihorel
Dear R-users, I would like to know how to pass arguments to gpar() without hard-coding them. I tried to store my arguments in a list and passed this list to gpar(), but it did find the way to do it properly. Any help would be appreciated. a- list(fontisze=8,col=3) gpar(fontsize=8,col=3)

  1   2   >