Re: [R] Import excel file

2012-11-19 Thread Hervy Cyril
Hello, According to manual R Data Import/Excel, xlsreadWrite package and RODBC package are used for 32-bit version (tests confirmed this observation) I used XLConnect package but it returned this error : Erreur dans new(J(com.miraisolutions.xlconnect.integration.r.RWorkbookWrapper), :

Re: [R] read.table

2012-11-19 Thread li1127217ye
read.table(data.txt,header=TRUE, colClasses=c(character,character,numeric,character, numeric,numeric)) a b c d e f 1 SPX LSZ 100 C 0 34.40 2 SPX LSZ 100 P 0 1.30 3 SPX LSZ 105 C 0 30.30 4 SPX LSZ 105 P 0 1.85 5 SPX LSZ 110 C 0 26.40 It's right result! header=TRUE,not header=T. I

[R] Stepwise analysis with fixed variables

2012-11-19 Thread Einat
Hello, How can I run a backward stepwise regression with part of the variables fixed, while the others participate in the backward stepwise analysis? Thank you, Einat -- View this message in context: http://r.789695.n4.nabble.com/Stepwise-analysis-with-fixed-variables-tp4650015.html Sent

Re: [R] Stepwise analysis with fixed variables

2012-11-19 Thread Uwe Ligges
On 19.11.2012 08:49, Einat wrote: Hello, How can I run a backward stepwise regression with part of the variables fixed, while the others participate in the backward stepwise analysis? Thank you, Einat Read ?step and about its argument scope that can be a list with a lower component where

Re: [R] loop to subtract arrays / error

2012-11-19 Thread Rui Barradas
Hello, Try the following. Xjj - matrix(nrow = 101, ncol = 1000) for (i in 1:dim(Vsimr)[2]) { Xjj[, i] - Vobsr - Vsimr[, i] } Hope this helps, Rui Barradas Em 19-11-2012 01:41, iembry escreveu: Hi everyone, I am having trouble with creating a loop to subtract arrays. In R, this is what I

Re: [R] read.table

2012-11-19 Thread Uwe Ligges
On 19.11.2012 08:07, li1127217ye wrote: read.table(data.txt,header=TRUE, colClasses=c(character,character,numeric,character, numeric,numeric)) a b c d e f 1 SPX LSZ 100 C 0 34.40 2 SPX LSZ 100 P 0 1.30 3 SPX LSZ 105 C 0 30.30 4 SPX LSZ 105 P 0 1.85 5 SPX LSZ 110 C 0 26.40 It's

Re: [R] read.table

2012-11-19 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of li1127217ye Sent: Monday, November 19, 2012 8:08 AM To: r-help@r-project.org Subject: Re: [R] read.table read.table(data.txt,header=TRUE,

Re: [R] loop to subtract arrays / error

2012-11-19 Thread Rui Barradas
Hello, Or simpler, since Vobsr only has one column: Xjj - as.vector(Vobsr) - Vsimr Hope this helps, Rui Barradas Em 19-11-2012 10:05, Rui Barradas escreveu: Hello, Try the following. Xjj - matrix(nrow = 101, ncol = 1000) for (i in 1:dim(Vsimr)[2]) { Xjj[, i] - Vobsr - Vsimr[, i] }

Re: [R] function customization

2012-11-19 Thread Uwe Ligges
On 16.11.2012 09:55, maxbre wrote: Given my reproducible example: new.ex-structure(list(TEC = c(0.21, 0.077, 0.06, 0.033, 0.014, 0.007, 0.21, 0.077, 0.01, 0.033, 0.05, 0.014), LR = c(FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE ), group = structure(c(1L, 1L,

Re: [R] Simulation with cpm package

2012-11-19 Thread Uwe Ligges
On 13.11.2012 15:45, Christopher Desjardins wrote: Hi, I am running the following code based on the cpm vignette's code. I believe the code is syntactically correct but it just seems to hang R. I can get this to run if I set the sims to 100 but with 2000 it just hangs. Any ideas why? No:

Re: [R] Interpretation of davies.test() in segmented package

2012-11-19 Thread Vito Muggeo
dear Greg, It does not, however give me Pr(|t|) for the break point coefficients. Of course a test H_0: breakpoint=0 is meaningless.. I need to answer the question H:0 Beta0=Beta with a certainty metric, sorry, who is your Beta0? davies.test() tests the hypothesis H0: leftSlope=rightSlope

Re: [R] Download a file from url

2012-11-19 Thread Suzen, Mehmet
you can use RCurl for web connections from Duncan Lang, see its paper: http://www.omegahat.org/RCurl/RCurlJSS.pdf getURL there will solve your problem. On Sun, Nov 18, 2012 at 2:07 AM, veepsirtt veepsi...@gmail.com wrote: Hi R, I installed wget and tried to download the file from this

[R] Introductory R course: 6-8.12.2012

2012-11-19 Thread Dr. Pablo E. Verde
Dear list members, Apologies for cross-posting, there are some places available in an introductory R course. Please, find below the information of this R training course. If you have any question, don't hesitate to contact me. Best regards, Pablo

Re: [R] How to retrieve data from a matrix

2012-11-19 Thread ginger
Thank you very much, It works! -- View this message in context: http://r.789695.n4.nabble.com/How-to-retrieve-data-from-a-matrix-tp4649721p4650036.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] loop to subtract arrays / error

2012-11-19 Thread Irucka Embry
Hi Rui Barradas, how are you? Thank-you very much. That worked perfectly. Irucka Embry -Original Message- From: Rui Barradas [ruipbarra...@sapo.pt] Sent: 11/19/2012 4:05:11 AM To: iruc...@mail2world.com Cc: r-help@r-project.org Subject: Re: [R] loop to subtract arrays / error Hello,

Re: [R] loop to subtract arrays / error

2012-11-19 Thread Irucka Embry
Hi Rui, thank-you. That was simple and worked great. Irucka -Original Message- From: Rui Barradas [ruipbarra...@sapo.pt] Sent: 11/19/2012 4:13:24 AM To: iruc...@mail2world.com Cc: r-help@r-project.org Subject: Re: [R] loop to subtract arrays / error Hello, Or simpler, since Vobsr

[R] internal cluster quality indexes

2012-11-19 Thread eliza botto
Dear useRs, I wanted to know something about the Index.G2 and Index.G3 which Calculate G2 and G2 internal cluster quality indexes. i tried to find material from internet but it seems that the file have been removed. Is it good to have higher values of these indexes or lower? thanks in

Re: [R] list.files, recursively

2012-11-19 Thread Jannis
Thanks, Rui and Jim, for your replies. I tried to post this question to r.devel but its admin told me that the question rather belongs into r-help. Thanks, Jim, for your suggestion. I have already constructed something similar. I posted my question to suggest modifying the function so that not

Re: [R] function customization

2012-11-19 Thread maxbre
thank you all for the great help, in particular to dennis murphy in order to close the thread I'm posting here the final solution to my question new.ex-structure(list(TEC = c(0.21, 0.077, 0.06, 0.033, 0.014, 0.007, 0.21, 0.077, 0.01, 0.033, 0.05, 0.014),

Re: [R] loop to subtract arrays / error

2012-11-19 Thread Irucka Embry
Hi Arun, thanks for your assistance. That worked as well. Irucka -Original Message- From: arun [smartpink...@yahoo.com] Sent: 11/19/2012 7:22:09 AM To: iruc...@mail2world.com Cc: r-help@r-project.org Subject: Re: [R] loop to subtract arrays / error HI, May be this helps:

Re: [R] Calculateing means

2012-11-19 Thread S Ellison
I have a data matrix with 570 columns containing 95 (samples) with 6 replicates each. How can I calculate the mean of the replicates for 95 samples? Write a function that calculates the sample means for a vector of 95 observations and then use apply() to apply that function to the whole

Re: [R] simple linear regression with proportion data

2012-11-19 Thread S Ellison
-Original Message- Can I use simple linear regression when I have proportion data for both dependent and independent variables? Or, should I use beta regression analysis? Or any suggestion? The distribution of the independent variable is irrelevant (in some

[R] Classification methods - which one?

2012-11-19 Thread Peter Kupfer
Dear all, i searched for some classification methods and I have no glue if i took the right once. My problem: I have a matrix with 17000 rows and 33 colums (genes and patients). The patients are grouped into 3 diseases. No I want to classify the patients and for sure i want to know which rows

Re: [R] side by side boxplots

2012-11-19 Thread lbp
I want to plot the results of multiple paired comparison in a side-by-side, in opposite direction with the standard error, graph. Would you please give me some help of howto. Thanks. Charlie. lbp [[alternative HTML version deleted]] __

Re: [R] additive interaction for a dichotomous dependent variable (i.e. risk difference)

2012-11-19 Thread wouterjohannes
Hi, No, I never got any response. I used an article by Knol to solve the issue. Ik hope this is useful for you too. Best regards, Wouter Knol, M.J., van, d.T., Grobbee, D.E., Numans, M.E., Geerlings, M.I., 2007. Estimating interaction on an additive scale between continuous determinants

Re: [R] Stepwise analysis with fixed variables

2012-11-19 Thread Einat
Thank you for the quick reply. Two more questions: 1. For example, if this is my code: RegModel = lm(glucose~sex+BMI+height+weight+education+ses,weight=w_without_non_response) summary(RegModel) step(RegModel, direction =backward,scope=list(lower=?,upper=?)) and I want the sex and height

[R] RQuantlib - Convertible Bond Pricing

2012-11-19 Thread colaiutachambers
Hi everyone, I’m working on my Master’s Degree thesis about the pricing of C.B. trying to do that with “R”. I read the paper “RQuantLib: Interfacing QuantLib from R” and now I’m matching several market price (taken from Bloomberg or Deutsche Bank database) with “R” output. Could you help me to

Re: [R] R-Square in WLS

2012-11-19 Thread frespider
Hi Peter, why you are involving -1 with this concept? Can you explain more please Cheers Date: Sun, 18 Nov 2012 23:28:26 -0800 From: ml-node+s789695n4650012...@n4.nabble.com To: frespi...@hotmail.com Subject: Re: R-Square in WLS On Nov 18, 2012, at 21:32 , Thomas Lumley wrote:

[R] lattice: defining grouping variable only for the upper/lower panel with splom

2012-11-19 Thread AnjaM
Using the mtcars dataset, how to define the grouping variable to be valid only for the upper or lower panel? The following doesn't work: # Code start splom(~data.frame(mpg, disp, hp, drat, wt, qsec), data=mtcars, pscales=0, auto.key=list(columns=3), upper.panel =

[R] Biologist R learner

2012-11-19 Thread andrew
I am a Biologist and a beginner, please help me to solve this: please anyone..its my homework and I dont have a clue abt R yet.. Write a function which does the following tasks: (a) Calculates minimum and maximum value of a given argument x. (b) If x is positive, some new vector gets the value

Re: [R] loop to subtract arrays / error

2012-11-19 Thread arun
HI, May be this helps: Vobsr-read.table(text= 81.071 73.187 66.991 62.482 59.662 58.529 59.085 61.328 65.259 70.878 ,sep=,header=FALSE) Vsimr=read.table(text= 81.07 81.07 73.19 73.19 65.81 67.16 58.93 63 52.55 60.7 46.68 60.25 41.31 61.67 36.44 64.95 32.08 70.08 28.22 77.08 ,sep=,header=FALSE)  

[R] Biologist R learner problem!!!help pls

2012-11-19 Thread Anna23
. QUse the built in dataset called iris in this task. (a) Calculate the result of following formula separately in every species for all of the numerical variables: log(x)/x. (b) Calculate trimmed mean for each of the numerical variables using apply–function. Choose your own trimming percentage

[R] help on matrix column removal based on another matrix results

2012-11-19 Thread iembry
Hi everyone, now I am trying to finish writing the code (I had asked for assistance on subtracting arrays) This is what I what I am running in R: source(/home/ie/Documents/TTU/GA_Research/GLUE/R-Project/R_GLUE_Example/NSEr.R) NSEr - function (obs, sim) { {jjh - (as.vector(obs) - sim)^2 Xjjhs -

[R] R SNA: Creating a adjacency matrix containing all actors but only values of a subset

2012-11-19 Thread Daniel Hain
1 down vote favorite my problem is the following: I am using the R SNA package for social network analysis. Lets say, my starting point is an edgelist with the following characteristics. Every row contains a firm name, the ID of a project they are involved and further characteristics,

Re: [R] Stepwise regression scope: all interacting terms (.^2)

2012-11-19 Thread Mark Ebbert
David, thanks for the feedback! Steve, thanks for the direction! I have heard and read some about Dr. Harrell's work but somehow had missed the term penalized logistic regression. That was helpful for finding more specific sources to follow Dr. Harrell's (and other's) suggestions. I may have

[R] Question about Package 'sampleSection' for IRT model

2012-11-19 Thread Kamontip Srihaset
Dear All, I am Ph.D student at Chulalongkorn University in Thailand, I want to use Package 'sampleSection' to estimate missing data which generate under IRT model(3-PL); n-500 ## number of examinee I-20 ## number of items num.imp-5 ##number of imputations p.missing-c(0.09, 0.01) #prob of

[R] Ben Bolker's '‘emdbook’ Package , rbetabinom

2012-11-19 Thread arun4
Hello, I am using rbetabinom ( to generate beta binomial random variables) function available in the emdbookpackage written by Professor. Ben Bolker for my research study. I have no questions with this function. However, I am looking for the theoretical method/algorithm of the function

Re: [R] RMySQL install on windows

2012-11-19 Thread Jeffrey Horner
Sorry for not taking care of this... If anyone would like to take over maintainership of RMySQL I'm sure the R community would greatly appreciate it. I just don't have the time these days. Jeff [[alternative HTML version deleted]] __

Re: [R] help on matrix column removal based on another matrix results

2012-11-19 Thread Rui Barradas
Hello, Try Vsim[] - Vsim[NSErr 0.6, ] Hope this helps, Rui Barradas Em 19-11-2012 14:30, iembry escreveu: Hi everyone, now I am trying to finish writing the code (I had asked for assistance on subtracting arrays) This is what I what I am running in R:

Re: [R] Biologist R learner

2012-11-19 Thread Berend Hasselman
On 19-11-2012, at 15:32, andrew wrote: I am a Biologist and a beginner, please help me to solve this: please anyone..its my homework and I dont have a clue abt R yet.. Write a function which does the following tasks: (a) Calculates minimum and maximum value of a given argument x. (b) If

Re: [R] Biologist R learner problem!!!help pls

2012-11-19 Thread Berend Hasselman
On 19-11-2012, at 15:48, Anna23 wrote: . QUse the built in dataset called iris in this task. (a) Calculate the result of following formula separately in every species for all of the numerical variables: log(x)/x. (b) Calculate trimmed mean for each of the numerical variables using

Re: [R] help on matrix column removal based on another matrix results

2012-11-19 Thread Rui Barradas
Sorry, the comma is in the wrong place, it should be Vsim[] - Vsim[ , NSErr 0.6] Rui Barradas Em 19-11-2012 16:18, Rui Barradas escreveu: Hello, Try Vsim[] - Vsim[NSErr 0.6, ] Hope this helps, Rui Barradas Em 19-11-2012 14:30, iembry escreveu: Hi everyone, now I am trying to finish

Re: [R] manipulating longitudinal data in r

2012-11-19 Thread Michael Dewey
At 17:13 18/11/2012, Jeff Newmiller wrote: Michael, this comment doesn't seem appropriate to the question, since the sample data is a ragged array that requires the addition of NAs to fit into a wide format. It does now but we do not know whether that was how it started life. My remarks were

Re: [R] survfit number of variables != number of variable names

2012-11-19 Thread Terry Therneau
I can't reproduce the problem. Tell us what version of R and what version of the survival package. Create a reproducable example. I don't know if some variables are numeric and some are factors, how/where the surv object was defined, etc. Terry Therneau On 11/17/2012 05:00 AM,

[R] expand time period

2012-11-19 Thread dms
I'd like to expand the following data to perform a daily time series. It should cover from '2012-07-01' to '2012-10-06' with the values I actually have being the mean from one point measurement to another. Does anyone has a clue to perform this task. structure(list(Date.beg = structure(c(15635,

[R] How to subset my data and at the same time keep the balance?

2012-11-19 Thread Eddie Smith
Hi guys, I have 1000 rows of a dataset. In my analysis, I need 70% of the data, run my analysis and then use the remaining 30% to test my model. Could anybody kindly help me on this? Cheers __ R-help@r-project.org mailing list

Re: [R] How to subset my data and at the same time keep the balance?

2012-11-19 Thread Rui Barradas
Hello, See the following example. x - matrix(rnorm(2000), ncol = 2) idx - sample(nrow(x), 0.7*nrow(x)) x2 - x[idx, ] nrow(x2) # 700 x3 - x[-idx, ] nrow(x3) # 300 Hope this helps, Rui Barradas Em 19-11-2012 17:16, Eddie Smith escreveu: Hi guys, I have 1000 rows of a dataset. In my

Re: [R] How to subset my data and at the same time keep the balance?

2012-11-19 Thread Sarah Goslee
I'm not sure what you mean by balance, but you can use sample() to randomly order the values 1:1000, then use the first 700 as row indices for the first set, and the last 300 as the test set. Sarah On Mon, Nov 19, 2012 at 12:16 PM, Eddie Smith eddie...@gmail.com wrote: Hi guys, I have 1000

[R] how to get bootstrap estimates

2012-11-19 Thread Tania Patiño
Hello all, could you explain me, how to get bootstrap estimates if i have the next data: scor mec vec alg ana sta 1 77 82 67 67 81 2 63 78 80 70 81 3 75 73 71 66 81 4 55 72 63 70 68 5 63 63 65 70 63 6 53 61 72 64 73 7 51 67 65 65 68 8 59 70 68 62

Re: [R] How to subset my data and at the same time keep the balance?

2012-11-19 Thread arun
HI, May be this helps: dat1-read.table(text=   V1 V2 1 5 10 2 6  3 3 8  4 4 9 20 5 15 30 6 25 40 7 2  4 8 3  1 9 1  5 10 8 10 ,header=TRUE) dat2-dat1[sample(NROW(dat1),NROW(dat1)*(1-0.3)),] #70% of data dat2$newcol-TRUE  dat1$newcol1-TRUE  dat4-merge(dat1,dat2,by=c(V1,V2),all=TRUE)  

[R] generated list element names

2012-11-19 Thread Sam Steingold
How can I create lists with element names created on the fly? --8---cut here---start-8--- list (foo = 10) $foo [1] 10 list (foo = 10) $foo [1] 10 list (paste(f,oo,sep=) = 10) Error: unexpected '=' in list (paste(f,oo,sep=) = --8---cut

Re: [R] generated list element names

2012-11-19 Thread jim holtman
How about this (if you don't like writing two lines, encapsulate it in a function): x - list(10) names(x) - paste('f', 'oo', sep = '') str(x) List of 1 $ foo: num 10 On Mon, Nov 19, 2012 at 1:07 PM, Sam Steingold s...@gnu.org wrote: How can I create lists with element names created on the

Re: [R] additive interaction for a dichotomous dependent variable (i.e. risk difference)

2012-11-19 Thread David Winsemius
On Nov 19, 2012, at 1:57 AM, wouterjohannes wrote: No, I never got any response. I used an article by Knol to solve the issue. Ik hope this is useful for you too. Best regards, Wouter Knol, M.J., van, d.T., Grobbee, D.E., Numans, M.E., Geerlings, M.I., 2007. Estimating interaction on

Re: [R] generated list element names

2012-11-19 Thread Sam Steingold
* jim holtman wubyg...@tznvy.pbz [2012-11-19 13:14:05 -0500]: How about this (if you don't like writing two lines, encapsulate it in a function): x - list(10) names(x) - paste('f', 'oo', sep = '') str(x) List of 1 $ foo: num 10 I am sorry, how is this different from my second snippet

Re: [R] generated list element names

2012-11-19 Thread William Dunlap
If you have a list and want to add a new (or replace a) named component use myList[[compName]] - compValue as in myList - list() compName - Incr compValue - function(x) x + 1 myList[[compName]] - compValue If you want to make a new list-with-names from scratch try

Re: [R] survfit number of variables != number of variable names

2012-11-19 Thread Georges Dupret
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Terry, I attached a small data set to this email. This is what I get (I restricted the formula to avoid NA's): surv = with(small, Surv(time=absence, event=(censored==FALSE))) (cox.s = coxph(surv ~ bucket*(today) + strata(activity), data =

Re: [R] How to subset my data and at the same time keep the balance?

2012-11-19 Thread Eddie Smith
Thanks a lot! I got some ideas from all the replies and here is the final one. newdata select - sample(nrow(newdata), nrow(newdata) * .7) data70 - newdata[select,] # select write.csv(data70, data70.csv, row.names=FALSE) data30 - newdata[-select,] # testing write.csv(data30, data30.csv,

Re: [R] lattice: defining grouping variable only for the upper/lower panel with splom

2012-11-19 Thread ilai
On Mon, Nov 19, 2012 at 5:42 AM, AnjaM a.miren...@gmail.com wrote: Using the mtcars dataset, how to define the grouping variable to be valid only for the upper or lower panel? The following doesn't work: # Code start Almost : splom(~data.frame(mpg, disp, hp, drat, wt, qsec),

[R] Help vectorizing data generation for IRT graded response model

2012-11-19 Thread drj571
Hello, I have code that will generate data for a 5 category IRT graded response model. However, the code could be improved through vectorizing. Here is the code below: ###Inputs N - 100 #Number of people taking test n - 10 #Number of items nCat - 5 #number of categories ###Generate Item

Re: [R] generated list element names

2012-11-19 Thread jim holtman
I missed the last snipet; just saw the first. So you have your solution. If you want a function, try: f.newList - function(x,name){.x - list(x);names(.x) - name;.x} f.newList(10, paste('f', 'oo', sep = '')) $foo [1] 10 On Mon, Nov 19, 2012 at 1:32 PM, Sam Steingold s...@gnu.org wrote: *

[R] Plot Area Dimensions

2012-11-19 Thread Richard James
Dear colleagues, I wish to create a figure with 6 plots arranged vertically with no spacing between them as they all have a common x-axis. However, using the code below I'm unable to get the plot area the same size for each plot. The bottom plot with the x-axis label is smaller than the

Re: [R] survfit number of variables != number of variable names

2012-11-19 Thread Carina Salt
Hi - I've seen a similar issue going on with survfit when using strata in the model, although I get a different error message from ge. If it helps to track down the problem (rather than confusing things further) here is some code that should reproduce the issue I've seen. I'm running R 2.15.2,

Re: [R] Biologist R learner

2012-11-19 Thread chuck.01
Please take the advice of Berend if you ever want to get help here. Also, you will need to do some basic and initial work yourself; read what he suggested, use Google to search keywords, and see great help like this: http://cran.r-project.org/doc/contrib/Short-refcard.pdf also, use the built in

Re: [R] survfit number of variables != number of variable names

2012-11-19 Thread Georges Dupret
Hi! In answer to: I noticed that you were using what might be called an externally created Surv object. I have a memory that Terry Therneau has criticized that practice. I cannot remember if it was in exactly this situation but I might ask if setting up the model as: cox =

[R] xts plot behavior

2012-11-19 Thread swiss_guy
*Hi I have problem with plot.xts . I try to subset some data in a xts time series.* *subseting works fore more that one event* *But I receive nothing, If I try to get one event * I'm happy for every hint! Thanks! -- View this message in context:

Re: [R] generated list element names

2012-11-19 Thread David Winsemius
On Nov 19, 2012, at 10:46 AM, William Dunlap wrote: If you have a list and want to add a new (or replace a) named component use myList[[compName]] - compValue as in myList - list() compName - Incr compValue - function(x) x + 1 myList[[compName]] - compValue If you want to make a new

Re: [R] Classification methods - which one?

2012-11-19 Thread Peter Kupfer
Dear Max, first: Thanks a lot for your suggestion and the open words about methods in real life. I guess: Thats my problem. Regarding my analysis: Yes, thats the problem and I have to coerce to do this analysis regarding lack of time to start something/other methods. So you suggest Linear

Re: [R] simple linear regression with proportion data

2012-11-19 Thread Ben Bolker
On 12-11-19 10:18 AM, S Ellison wrote: -Original Message- Can I use simple linear regression when I have proportion data for both dependent and independent variables? Or, should I use beta regression analysis? Or any suggestion? The distribution of the independent variable is

Re: [R] Plot Area Dimensions

2012-11-19 Thread Richard M. Heiberger
I think this task would be easier in lattice library(lattice) xyplot(y + y + y + y + y + y ~ x, outer=TRUE, layout=c(1,6), strip=FALSE, strip.left=TRUE, ylab=6 copies of the Y variable, main=put an interesting title here) Six different y variables instead of six

Re: [R] Error in Sweave but not underlying script

2012-11-19 Thread Bush, Daniel P. DPI
No, that did not resolve the issue, but thanks for the suggestion. Daniel Bush | School Finance Consultant School Financial Services | Wis. Dept. of Public Instruction daniel.bush -at- dpi.wi.gov | 608-267-9212 -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]

Re: [R] Error in Sweave but not underlying script

2012-11-19 Thread Duncan Murdoch
On 19/11/2012 3:27 PM, Bush, Daniel P. DPI wrote: No, that did not resolve the issue, but thanks for the suggestion. Here's another possibility: your Sweave session may not be setting the same option defaults in startup code as your regular session. This one just bit me: I normally work

Re: [R] aggregate() runs out of memory

2012-11-19 Thread Sam Steingold
Thanks Steve, what is the analogue of .N for min and max? i.e., what is the data.table's version of aggregate(infl$delay,by=list(infl$share.id),FUN=min) aggregate(infl$delay,by=list(infl$share.id),FUN=max) thanks! Sam. On Fri, Sep 14, 2012 at 3:40 PM, Steve Lianoglou

Re: [R] aggregate() runs out of memory

2012-11-19 Thread Steve Lianoglou
Hi, On Mon, Nov 19, 2012 at 1:25 PM, Sam Steingold s...@gnu.org wrote: Thanks Steve, what is the analogue of .N for min and max? i.e., what is the data.table's version of aggregate(infl$delay,by=list(infl$share.id),FUN=min) aggregate(infl$delay,by=list(infl$share.id),FUN=max) thanks! It

[R] Find the number of intersections according factor levels

2012-11-19 Thread li li
Dear all, I have two vectors x and y, both of which are of length 1000. I created a factor as.factor(rep(1:100,each=10)). Now I want to count, for each factor level, the number of intersections between x and y. In other words, I would like to count the number of intersections between x[1:10]

[R] Is it possible to be sponsored by R?

2012-11-19 Thread Christophe Genolini
Hi the list, I am a member of the organizing comity of the French Statistics Association (SFdS)'s conference. We are looking for sponsors. Some software (SAS, RITME, ...) are represented. Do you know if there is any possibility to be sponsored by R (or by an association close to R)? Do you

Re: [R] Plot Area Dimensions

2012-11-19 Thread David L Carlson
You can also use layout() with base graphics. This example sets up a column of 14 strips and allocates 3 strips to the top and bottom graphs and 2 strips To the four middle graphs. Using Richard's tmp dataframe: layout(matrix(c(1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 6), 14, 1)) layout.show(6)

[R] scatterplot3d and box3d

2012-11-19 Thread xgao
I created a 3d scatter plot and am trying to change the color of outer box lines with box3d. Anybody can help me to figure out how to do this? My example is: library(scatterplot3d) x=seq(1:6) y=seq(7:12) z=x*2 scatterplot3d(x, y,z) Thanks. Xin __

[R] Coefficient of Variation, NA, Aggregate

2012-11-19 Thread Amanda Jones
Hello helpers, I have a two part issue. FIRSTLY, I am attempting to write a function for coefficient of variation, using co.var - function(rowleyi) ( 100*sd(rowleyi)/mean(rowleyi) ) #where rowleyi is my data set, which has multiple columns and rows of data. This is not working because some

[R] Help: Meta-analysis with metacor

2012-11-19 Thread Catherine Proulx
Trying to do a meta-analysis of correlations in R using the meta package; have tried several things and keep getting a similar error. Can anyone help explain the error? cor-c(-0.3018, 0.667, -3.8002, -0.607, -0.4885, -3.8002, -0.0701, 0.1348, -0.9505, -0.5709, -0.6127, -1.2419, -0.1511,

[R] Performing gage RR study in R w/more than 2 factors

2012-11-19 Thread Matt Jacob
Hi everyone, I'm fairly new to R, and I don't have a background in statistics, so please bear with me. ;-) I'm dealing with 2^k factorial designs, and I was just wondering if there's any way to analyze more than two factors of a gage RR study in R. For example, Minitab has an expanded gage RR

Re: [R] Import excel file

2012-11-19 Thread Martin Studer
Hi Cyril, please let me know the following details: - sessionInfo() output from R - Version of XLConnect you are using - Version of rJava you are using - Version of Java you are using (complete output of java -version on the command line) - Value of the JAVA_HOME environment variable if it is set

Re: [R] Is it possible to be sponsored by R?

2012-11-19 Thread Ben Bolker
Christophe Genolini cgenolin at u-paris10.fr writes: Hi the list, I am a member of the organizing comity of the French Statistics Association (SFdS)'s conference. We are looking for sponsors. Some software (SAS, RITME, ...) are represented. Do you know if there is any possibility to

Re: [R] Ben Bolker's '‘emdbook’ Package , rbetabinom

2012-11-19 Thread Ben Bolker
arun4 arun.ganesh2012 at gmail.com writes: I am using rbetabinom ( to generate beta binomial random variables) function available in the emdbookpackage written by Professor. Ben Bolker for my research study. I have no questions with this function. However, I am looking for the theoretical

Re: [R] Coefficient of Variation, NA, Aggregate

2012-11-19 Thread arun
HI, For the first part, may be this helps: set.seed(5) mat1-matrix(sample(c(1:9,NA),20,replace=TRUE),ncol=5) rowleyi-data.frame(mat1)  co.var-function(x) 100*(sd(x,na.rm=TRUE)/mean(x,na.rm=TRUE))  apply(rowleyi,2,function(x) co.var(x)) #  X1   X2   X3   X4   X5 #53.29387

Re: [R] aggregate() runs out of memory

2012-11-19 Thread David Winsemius
On Nov 19, 2012, at 1:25 PM, Sam Steingold wrote: Thanks Steve, what is the analogue of .N for min and max? ?seq i.e., what is the data.table's version of aggregate(infl$delay,by=list(infl$share.id),FUN=min) aggregate(infl$delay,by=list(infl$share.id),FUN=max) DT[, list( max(v)), by=x]

Re: [R] scatterplot3d and box3d

2012-11-19 Thread Duncan Murdoch
On 12-11-19 12:20 PM, x...@genome.wustl.edu wrote: I created a 3d scatter plot and am trying to change the color of outer box lines with box3d. Anybody can help me to figure out how to do this? My example is: library(scatterplot3d) x=seq(1:6) y=seq(7:12) z=x*2 scatterplot3d(x, y,z) See

Re: [R] scatterplot3d and box3d

2012-11-19 Thread Ben Bolker
xgao at genome.wustl.edu writes: I created a 3d scatter plot and am trying to change the color of outer box lines with box3d. Anybody can help me to figure out how to do this? My example is: library(scatterplot3d) x=seq(1:6) y=seq(7:12) z=x*2 scatterplot3d(x, y,z) This is not

Re: [R] Plot Area Dimensions

2012-11-19 Thread Greg Snow
The key is to not change the margins, set them once and stick with those margins. The next question then becomes how do I leave area at the top/bottom for the title and common axis? to which the answer is Set outer margins at the beginning. Modifying your code: y-rnorm(1:100) x-rnorm(1:100)

Re: [R] Coefficient of Variation, NA, Aggregate

2012-11-19 Thread arun
HI, Your example dataset is in unreadable format.  You could use dput(). set.seed(5)  mat1-matrix(sample(c(1:9,NA),20,replace=TRUE),ncol=5)  rowleyi-data.frame(mat1)   co.var-function(x) 100*(sd(x,na.rm=TRUE)/mean(x,na.rm=TRUE))  rowleyi-data.frame(subspecies=rep(LETTERS[1:2],2),rowleyi)

Re: [R] Coefficient of Variation, NA, Aggregate

2012-11-19 Thread Amanda Jones
Fantastic, thank you! On Mon, Nov 19, 2012 at 3:44 PM, arun smartpink...@yahoo.com wrote: HI, Your example dataset is in unreadable format. You could use dput(). set.seed(5) mat1-matrix(sample(c(1:9,NA),20,replace=TRUE),ncol=5) rowleyi-data.frame(mat1) co.var-function(x)

Re: [R] Coefficient of Variation, NA, Aggregate

2012-11-19 Thread arun
HI, No problem. You got two NA in the previous example. According to the coefficient of variaion documentation in R (http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/raster/html/cv.html) Compute the coefficient of variation (expressed as a percentage). If there is only a single value, sd is

Re: [R] Performing gage RR study in R w/more than 2 factors

2012-11-19 Thread Bert Gunter
I believe that you need to consult a local statistician, as there are likely way too many statistical issues here that you do not fully understand. Alternatively, try posting to a statistical list like stats.stackexchange.com, as I think most of your issues are primarily statistical, not R

Re: [R] xts plot behavior

2012-11-19 Thread R. Michael Weylandt
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example RMW On Mon, Nov 19, 2012 at 5:27 PM, swiss_guy steven.stut...@swissglobal-am.com wrote: *Hi I have problem with plot.xts . I try to subset some data in a xts time series.* *subseting works fore more

Re: [R] Coefficient of Variation, NA, Aggregate

2012-11-19 Thread Rui Barradas
Hello, Just a note, you can (should?) have an argument na.rm in your function definition with a small modification, like this: co.var - function(x,na.rm=TRUE) 100*(sd(x,na.rm=na.rm)/mean(x,na.rm=na.rm)) Then you can choose to use the default TRUE or not. Hope this helps, Rui Barradas Em

[R] kinitr

2012-11-19 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hello, I am an Intro-level R and ggplot2 user and looking for resources to self teach dynamic report generation in R using knitr. Any advice would be highly appreciated. Thanks, Pradip __ R-help@r-project.org mailing list

[R] github

2012-11-19 Thread Muhuri, Pradip (SAMHSA/CBHSQ)
Hello, I would like to learn how to set up Github/repository and upload/update files and am looking for Github for Dummies. Any help will be appreciated. Thanks, Pradip __ R-help@r-project.org mailing list

Re: [R] kinitr

2012-11-19 Thread Pascal Oettli
Hello, Why don't you search on Internet? Regards, Pascal Le 20/11/2012 10:57, Muhuri, Pradip (SAMHSA/CBHSQ) a écrit : Hello, I am an Intro-level R and ggplot2 user and looking for resources to self teach dynamic report generation in R using knitr. Any advice would be highly appreciated.

Re: [R] github

2012-11-19 Thread David Winsemius
On Nov 19, 2012, at 6:07 PM, Muhuri, Pradip (SAMHSA/CBHSQ) wrote: Hello, I would like to learn how to set up Github/repository and upload/update files and am looking for Github for Dummies. Any help will be appreciated. Wrong list for this question. -- David Winsemius, MD Alameda,

Re: [R] survfit number of variables != number of variable names

2012-11-19 Thread David Winsemius
On Nov 19, 2012, at 5:33 PM, Georges Dupret wrote: Hi David, Sorry for the signature files... this is automatic. I should disable that. Please find in attachment a copy of small.csv.gz I found it but I suspect nobody else will. I think Terry Therneau already got a copy. when you

[R] method show

2012-11-19 Thread Andrea Spano
Hello the list, As a simple example: rm(list = ls()) setClass(tre, representation(x=numeric)) setMethod(show, tre, def = function(object) cat(object@x))[1] show setMethod(summary, tre, def = function(object) cat(This is a tre of value , object@x, \n))Creating a generic function for

  1   2   >