Re: [R] Need online version of R help pages

2015-04-18 Thread Michael Dewey
I am not sure how helpful this is going to be but Appendix C7 in the Installation and Administration manual is pretty bleak about your prospects with Cygwin. On 18/04/2015 02:17, Paul Domaskis wrote: With all due respect, Duncan, I can't find the message advising against using the Cygwin

Re: [R] strip levels

2015-04-07 Thread Michael Dewey
of showing respective year of 2002 and 2014 in each of the lattice plot, it just shows Year in all lattice plot as attached. TxT Do you know what has gone wrong? Many thanks. Regards, Christine 2015年4月6日 星期一,Michael Dewey li...@dewey.myzen.co.uk 寫道

Re: [R] Trim and fill procedure

2015-04-06 Thread Michael Dewey
Hello Carlijn Well the documentation for trimfill says they are added. library(metafor) example(trimfill) This now leaves you with res res.tf By looking at these and seeing which vectors have grown you should be able to extract the yi and vi which you want. Wolfgang will doubtless be on

Re: [R] strip levels

2015-04-06 Thread Michael Dewey
See inline On 06/04/2015 15:39, Sarah Goslee wrote: Hi, On Mon, Apr 6, 2015 at 7:44 AM, Christine Lee via R-help r-help@r-project.org wrote: To whom it may help, I am new to R. I have been tring to have a lattice plot in two strip levels: 4 stations in 2 years. I type in:

Re: [R] about model.matrix

2015-04-02 Thread Michael Dewey
you very much for the response. Then what does it mean? I am not a stat person, but have to use it for my project. :( Could you please recommend some readings about it? Thanks a lot! On Wednesday, April 1, 2015 10:58 AM, Michael Dewey li...@dewey.myzen.co.uk wrote: This is really a question

Re: [R] pairwise.t.test non numeric factors error

2015-06-03 Thread Michael Dewey
Just to be on the safe side, what is T? It is recommended to use TRUE in case you set T to something else. I think this is very unlikely to solve the problem but it is worth trying. On 03/06/2015 18:14, Erica Cseko Nolasco wrote: Thanks Jim, I removed the corresponding cases and tried again.

Re: [R] create a dummy variables for companies with complete history.

2015-06-24 Thread Michael Dewey
Comments below On 24/06/2015 19:26, giacomo begnis wrote: Hi, I have a dataset (728 obs) containing three variables code of a company, year and revenue. Some companies have a complete history of 5 years, others have not a complete history (for instance observations for three or four

Re: [R] Restricting Decimal Places in the Output

2015-06-17 Thread Michael Dewey
Dear Shivi On 17/06/2015 13:15, Shivi82 wrote: Hi Petr, The solution you shared worked though it does not show any decimal values. The output is Group.1 x 11/1/2015309450 2 1/10/2015 332780 Instead of mean i used sum i think that should be fine.

Re: [R] Request

2015-06-15 Thread Michael Dewey
Dear Djamil On 15/06/2015 14:37, MALIOU Djamil wrote: Dear Sir or Madame, I am a novice in R, and I want to perform a meta analysis of case control studies (analytic), i want a step by step explanation if it's possible, You can find details about packages which support meta-analysis in R in

Re: [R] analysis of variance test

2015-05-29 Thread Michael Dewey
Dear Nezahat In future it would be helpful if you 1 - gave us the data so we can reproduce what you are doing 2 - told us what the error was in case we cannot replicate ti 3 - did not post in HTML as it messes up everything in your post What did you think x1 - numeric was going to do? Try x1 -

Re: [R] merge function

2015-06-01 Thread Michael Dewey
On 01/06/2015 14:46, carol white via R-help wrote: Hi,By default the merge function should take the intersection of column names (if this is understood from by = intersect(names(x), names(y)), Dear Carol The by parameter specifies which columns are used to merge by. Did you understand it

Re: [R] Help on Histogram ~ Barplot

2015-05-27 Thread Michael Dewey
On 27/05/2015 11:56, Shivi82 wrote: HI Jim, Thanks for the help however R throws an error when i create a var tot_mon_wt- tot_mon_wt-by(mwlc$MFST_WT,mwlc$Month,sum). It gives me an error = Error in Summary.factor(c(1L, 1L), na.rm = FALSE) : ‘sum’ not meaningful for factors Not sure what

Re: [R] Fishers test.

2015-06-30 Thread Michael Dewey
Dear Harmeet Well 1 - why not try it? 2 - what does the help say? Or do you have some deeper question? On 30/06/2015 13:20, My List wrote: All: I wanted to know if the fishers test can be applied to RxC where and R and C are greater than 2, by using the fisher.test() or fisher.test() with

Re: [R] Issues with loading csv file

2015-05-25 Thread Michael Dewey
You could try list.files() which will tell you which files R thinks are in your working directory. On 25/05/2015 13:19, Shivi82 wrote: HI All, I am trying to load an CSV file into the R project. the code for the same is: mydata- read.csv(Jan-May Data.csv, header=TRUE) however with this I am

Re: [R] R: help with metasens

2015-08-13 Thread Michael Dewey
metaphor function. Mario PS: what is diagonal bacn? -Messaggio originale- Da: Michael Dewey [mailto:li...@dewey.myzen.co.uk] Inviato: mercoledì 12 agosto 2015 18.19 A: petre...@unina.it; r-help@r-project.org Oggetto: Re: [R] help with metasens Dear Mario I do not use metasens myself so cannot

Re: [R] difference between write.csv(...) and write.table(..., sep=, )

2015-08-16 Thread Michael Dewey
I think that if you do ?write.csv and then page down to the section entitled CSV files the mystery will be solved for you in the first few paragraphs. On 16/08/2015 15:38, Jinsong Zhao wrote: Hi there, I notice that write.csv is a wrap of write.table. However, I can't get the same results

Re: [R] Error message from allEffects(model) / effect(model) ‘range’ not meaningful for factors

2015-08-19 Thread Michael Dewey
You rm is of class summary.lm Is that what allEffects is expecting? On 19/08/2015 01:49, Robert Zimbardo wrote: Hi I cannot figure out why the effects package throws me error messages with the following simple code: rm(list=ls(all=TRUE)); set.seed(1); library(effects) # set up data x -

Re: [R] Metafor and forest(); not showing 'ilab' and text

2015-08-24 Thread Michael Dewey
Dear Marco Comments inline On 24/08/2015 15:03, Marco Colagrossi wrote: Hello folks, I have a couple of issues with the metafor package, specifically with the forest graphs. I am currently conducting a Meta-Analysis in economics throughout the metafor package. My meta-analysis has the

Re: [R] Clarification on Simulation and Iteration

2015-08-01 Thread Michael Dewey
I am not sure how you are doing this but there is a package on CRAN which implements the Copas model (metasens). I am not sure whether that would help in your modelling. On 01/08/2015 02:36, Christopher Kelvin via R-help wrote: Dear All, I am performing some simulations for a new model. I run

Re: [R] Global variables

2015-07-28 Thread Michael Dewey
In line comments On 28/07/2015 13:22, jpara3 wrote: Hi, I want to pass a variable value from one function to another, but not as a function argument. For this propose I have put -, but it doesn´t work. My code: one-function(){ a-variable passed } So you have to execute one() first?

Re: [R] Advice on data format

2015-08-05 Thread Michael Dewey
Dear Trent If you want them side-by-side in one data frame then you could use merge making sure it only merges by date. I would use sub to change all the anitbiotic names by adding h1 h2 and so on. Then you can sum antibiotic over hospital by using grep to select all the columns containing

Re: [R] cut variable within a loop

2015-08-11 Thread Michael Dewey
Dear Janka If you supply a single number to the breaks parameter of cut I think it is the number of intervals. On 11/08/2015 13:57, Janka Vanschoenwinkel wrote: Hi Thierry! Thanks for your answer. I tried this, but I get this error: Error in cut.default(x, k2) : invalid number of intervals

Re: [R] Why does R start in wrong working directory despite R_USER setting?

2015-08-07 Thread Michael Dewey
Assuming you are using the GUI you can use the Properties of the shortcut to tell R where to start. On 07/08/2015 17:31, Mauricio Cornejo via R-help wrote: Hi After launching newly-installed R 3.2.1 (on Windows 7), I run the following two commands: getwd()[1]

Re: [R] Multi-line forestplots, how to in R

2015-08-14 Thread Michael Dewey
Read Ella Comments in-line below On 14/08/2015 00:36, mcknight e. (em8g14) wrote: Hello, I am working on ecological data covering a meta-analysis on invasive species traits. I am not very skilled in R and would love if someone could assist me in my production of multi-line forest plots.

Re: [R] help with metasens

2015-08-12 Thread Michael Dewey
Dear Mario I do not use metasens myself so cannot be of direct help but I have looked at your dataset and it does seem rather strange (as you perhaps know). You have two quite large studies with very large hazard ratios and if we ignore them all the rest of the studies fall on a diagonal

Re: [R] accessing confidence interval values from the 'predict' function

2015-08-10 Thread Michael Dewey
Dear Avril I think you will find that predict.lm returns a matrix not a data frame. I find str() useful when R does things I did not expect or quite understand. Michael On 10/08/2015 09:20, alc wrote: Dear all, I'm wondering how can I access the confidence interval values ('upr' and

Re: [R] Compute z

2015-07-26 Thread Michael Dewey
Dear Hal Are you looking for %*% by any chance? On 26/07/2015 09:38, admin.dslcompu...@gmail.com wrote: Hi Everyone: How do I correctly compute z? z = 0; for i = 1:7 z = z + v(i) * w(i) end If there are two column vectors v and w, each with 7 elements (i.e., they have dimensions

Re: [R] Differences in output of lme() when introducing interactions

2015-07-20 Thread Michael Dewey
In-line On 20/07/2015 15:10, angelo.arc...@virgilio.it wrote: Dear List Members, I am searching for correlations between a dependent variable and a factor or a combination of factors in a repeated measure design. So I use lme() function in R. However, I am getting very different results

Re: [R] R: Re: R: Re: Differences in output of lme() when introducing interactions

2015-07-21 Thread Michael Dewey
Dear Angelo I suggest you do an online search for marginality which may help to explain the relationship between main effects and interactions. As I said in my original email this is a complicated subject which we are not going to retype for you. If you are doing this as a student I suggest

Re: [R] Metafor and forest(); not showing 'ilab' and text

2015-08-25 Thread Michael Dewey
To: Viechtbauer Wolfgang (STAT) Cc: r-help@r-project.org; Michael Dewey Subject: Re: [R] Metafor and forest(); not showing 'ilab' and text Thanks again for your help. I'm sorry to bother you but I don't get how to widen the forest plot; if I try to change the values of xlim or the ilab.xpos values

Re: [R] How to plott bar graphics

2015-10-25 Thread Michael Dewey
Dear Ujjwal Two problems 1 - you posted in HTML so your post is unreadable 2 - your attached graphic was not in one of the formats which R-help accepts and so was stripped On 25/10/2015 11:04, Ujjwal Kumar wrote: HI friends I am struggling in plotting bar graph with this data sets in R.

Re: [R] Memory problems with mice

2015-10-27 Thread Michael Dewey
Dear Jennifer See inline below On 27/10/2015 12:20, Lorenz, Jennifer wrote: Hi everyone, I am trying to perform a multiple imputation with mice on a dataset of about 13000 observations and 178 variables. I can start an "empty" imputation ("imp_start <- mice(data, maxit=0)"), but after a few

Re: [R] MAc-pakcage, on OS-X 10.11.1: Warning Message In sqrt(var.T.agg.tau) : NaNs produced

2015-11-10 Thread Michael Dewey
Dear Kostadin You could give us the data (after all there are only three studies) so we can run it through a different package or you could look at the code for omni and see where it is computing sqrt(var.T.agg.tau) and how it computed that in the first place. And you could turn off HTML in

Re: [R] random number generation

2015-11-11 Thread Michael Dewey
Dear Leila Does the function mvrnorm in package MASS do what you want? On 11/11/2015 08:38, leila zamani via R-help wrote: Hi every one, I'm new to R. I read about R and search all the packages but I couldn't find the package that I want. I want to generate 2D (matrices) random numbers that

Re: [R] Compute Regressions with R-Function

2015-11-12 Thread Michael Dewey
In-line On 12/11/2015 16:27, Matthias Worni wrote: Hello I was trying to set up a function() that allows easely to calculate regressions for severel dependent variables with the same independent variables. My function looked like this but was turned down by an error (Im quiet new to R

Re: [R] sub-sample my data in R from two different tables

2015-10-19 Thread Michael Dewey
Dear John I suspect ?merge will help here. You would need to tidy up afterwards (or before) if you do not want the other columns in your dataframe of keys to be included in the result. On 19/10/2015 11:19, John Wasige wrote: ​Hi, I need help on how to sub-sample my data in R. I have two

Re: [R] what constitutes a 'complete sentence'?

2015-07-07 Thread Michael Dewey
In line below On 07/07/2015 11:20, peter dalgaard wrote: ...except that there is not necessarily a verb either. What we're looking for is something like advertisement style as in UGLY MUGS 7.95. An invaluable addition to your display cabinet. Comes in an assortment of warts and wrinkles,

Re: [R] Problem loading mvabund package

2015-08-28 Thread Michael Dewey
Dear Suparna, See below On 28/08/2015 10:22, Suparna Mitra wrote: Hello, Can anybody please help me with mvabund package installation? I downloaded and installed it. It seems installed, but I can't load the package. Here is what I tried:

Re: [R] Frequency count of terms only in a given column in R

2015-08-28 Thread Michael Dewey
Dear Agrima As well as Sarah's seven possibilities an eighth occurs to me: you have not yet read it into R in the first place. If that is the case you may be able to use read.table to get it into a data frame with columns corresponding to your words. ?read.table may be your friend here. On

Re: [R] Metafor and forest(); not showing 'ilab' and text

2015-08-31 Thread Michael Dewey
I think it a random intercept but Wolfgang may correct me there. 3. metareg1 <- rma.mv(pc, var, random = ~ 1 | author, mods = ~ pub + SIMiv, data=codebook) Again, if I'm correct this should be a multilevel meta regression (correct me if I'm wrong); I have the same doubts as before. Thank yo

Re: [R] Median on second group of CSV file produce Na

2015-09-01 Thread Michael Dewey
Dear Shawin You probably did not get an answer because 1 - you seem to have posted in HTML which mangled your post into unreadability 2 - there seem to be lots of lines which do not do anything germane to the problem. Why not try summary(y) or str(y) before you convert it to a matrix and

Re: [R] Metafor and forest(); not showing 'ilab' and text

2015-09-01 Thread Michael Dewey
Netherlands | +31 (43) 388-4170 | http://www.wvbauer.com -Original Message- From: Marco Colagrossi [mailto:[hidden email] <http:///user/SendEmail.jtp?type=node=4711682=0>] Sent: Monday, August 31, 2015 18:37 To: Michael Dewey Cc: Viechtbauer Wolfgang (STAT); [hidden email] <h

Re: [R] Median on second group of CSV file produce Na

2015-09-01 Thread Michael Dewey
, Michael Dewey-3 [via R] < ml-node+s789695n4711707...@n4.nabble.com> wrote: Dear Shawin You probably did not get an answer because 1 - you seem to have posted in HTML which mangled your post into unreadability 2 - there seem to be lots of lines which do not do anything germane to the problem

Re: [R] Metafor and forest(); not showing 'ilab' and text

2015-08-25 Thread Michael Dewey
Hello Marco Comments in line again On 24/08/2015 18:49, Marco Colagrossi wrote: I tried to upload the file once again. I tweaked it a bit, now my code is: forest(pc, var, ci95m, ci95p, slab = authoryear, psize=1, subset=(pub==1), xlim = c(-16, 6), ilab = cbind(SIMdv, SIMiv),

Re: [R] a question about data manipulation in R

2015-09-13 Thread Michael Dewey
Dear Zahra Your email is completely unreadable because you posted in HTML. Please reset your mailer and try again. On 13/09/2015 06:12, Zahra Karimi via R-help wrote: Hello, I have a data like this:1 2331 3331 4551 3452 5432 4332 3442 4003 4443 1113 0003 432I want to change it to this new

Re: [R] 回覆︰ adding a line across plots in xy plot with panel.abline

2015-09-14 Thread Michael Dewey
Dear Christine The point of the ellipsis ... is to pass into the interior function any other parameters which were supplied to the exterior function. If you know for sure that there will never, never, never be such additional parameters then you can leave it out but that is a bit like not

Re: [R] R lines type in a glm/predict model

2015-09-14 Thread Michael Dewey
Dear Laura The line type is usually something like: solid, dotted, dashed, ... The shapes you suggest are usually point symbols. When you repost perhaps it would be a good idea to 1 - give us a small dataset 2 - just supply code for two species 3 - tell us what you see, and what you really

Re: [R] R lines type in a glm/predict model

2015-09-15 Thread Michael Dewey
Dear Laura As you can see you have us all very puzzled. I think something is getting lost in translation between the language of Cervantes and the language of Shakespeare. Perhaps 1 - send a picture of a square line 2 - tell us what square line is in Spanish 3 - find the Spanish language R

Re: [R] generate ordered categorical variable in R

2015-09-16 Thread Michael Dewey
If I understand correctly ?sample On 16/09/2015 18:11, thanoon younis wrote: Dear R- users I want to generate ordered categorical variable vector with 200x1 dimension and from 1 to 4 categories and i tried with this code Q1=runif(200,1,4) the results are not just 1 ,2 3,4, but the results

Re: [R] Calling external file

2015-10-03 Thread Michael Dewey
You did put the declaration of the function fn into the file you are sourcing, didn't you? If it were me I would 1 - make fn a parameter of max.calls 2 - use the ellipsis ... so I could pass other arguments in to MaxLike 3 - fix the errors I got from making it a package. It does not lie when

Re: [R] Calling external file

2015-10-04 Thread Michael Dewey
In line On 03/10/2015 23:56, Steven Yen wrote: Thanks Bill. Simplified content of max.calls.R (with repeated calls to maxLik removed) are shown below in the message. No, fn does not exist in the environment. Which explains why R cannot find it. I call a routine (say probit.R compiled into a

Re: [R] Singular Spectrum Analysis Plotting Skipping in a loop, but individually it works

2015-09-28 Thread Michael Dewey
Dear Dileep What happens if you explicitly print it by wrapping the plot command in print( ) On 28/09/2015 07:01, കുഞ്ഞായി kunjaai wrote: Dear all, I am trying to plot Spectrum of Singular Values using "Rssa" package. I am trying to plot singular spectrum plot inside a loop, it is not

Re: [R] doubt with Odds ratio - URGENT HELP NEEDED

2015-09-23 Thread Michael Dewey
Dear Rosa It would help if you posted the error messages where they occur so that we can see which of your commands caused which error. However see comment inline below. On 22/09/2015 22:17, Rosa Oliveira wrote: Dear all, I’m trying to compute Odds ratio and OR confidence interval. I’m

Re: [R] doubt with Odds ratio - URGENT HELP NEEDED

2015-09-23 Thread Michael Dewey
oef$random$ident[,1]+lme.1$coef$fixed[1] + lme.slope<- lme.1$coef$random$ident[,2]+lme.1$coef$fixed[2] + selector<-as.numeric(names(lme.intercept)) #to select not NA rows. Apply to the vector in the dataset + + test(dataa$intercept[resultado.hosp==1], dataa$intercept[resultado.hosp==0])

Re: [R] doubt with Odds ratio - URGENT HELP NEEDED

2015-09-24 Thread Michael Dewey
iveira, E-mail:rosit...@gmail.com <mailto:rosit...@gmail.com> Tlm: +351 939355143 Linkedin: https://pt.linkedin.com/in/rosacsoliveira ________ "Many admire, few know" Hippocrates On 23 Sep 2015, at 16:29, Michael Dewey <li...@

Re: [R] store results in loop

2015-09-22 Thread Michael Dewey
Dear Nico Comment inline On 22/09/2015 10:36, Nico Gutierrez wrote: Hi All, very rusty in R.. my results get overwritten when try to store within the loop. This my code: ListS=unique(data$Spec) Stat<- numeric(0) for(i in 5){ Is that what you meant? I would have expected something like 1:5

Re: [R] help

2015-09-18 Thread Michael Dewey
Comment in-line On 18/09/2015 11:04, thanoon younis wrote: Hi, I need you help to correct the code below please I have this error Error in if (v[j] >= 0) yo[i, j] <- 1 else yo[i, j] <- 0 : missing value where TRUE/FALSE needed library(mvtnorm) #Load mvtnorm package N<-200;P<-9

Re: [R] best data storage format?

2015-09-18 Thread Michael Dewey
Dear Alfa Although John's advice is excellent if you already have the dataset in R in your case it seems that is not the case. Since R-help strips off most attachments you may need to put your .csv file somewhere like Dropbox or fool R-help into thinking it is a plain text file. On

Re: [R] best data storage format?

2015-09-18 Thread Michael Dewey
I am afraid I cannot see any quick way to do this although I am sure some of our data structure experts will be able to. As I see it your lines come in triples. The first line mostly consists of character data, the second is predominantly numeric and is values of x, the third is predominantly

Re: [R] There is an error when I performed chisquare and postanova test...:(

2015-09-25 Thread Michael Dewey
Dear massmatics The list has a no homework policy but in this case I feel I can depart from that. Have you tried reading the documentation for chisq.test? On 25/09/2015 12:44, massmatics wrote: I am studying for a quiz and while I was solving two problems, an error occured. a) So the problem

Re: [R] There is an error when I performed chisquare and postanova test...:(

2015-09-25 Thread Michael Dewey
Let me repeat my advice Read the documentation for chisq.test and see if it has the parameters you think it has. On 25/09/2015 14:12, massmatics wrote: Yes, so far, we only learned how to use chisq.test when performed at 0.05 significance level But not when it is at 0.01 -- View this

Re: [R] forest plot metafor

2015-12-11 Thread Michael Dewey
See below On 09/12/2015 18:48, Mario Petretta wrote: Dear all, I use metafor package to generate a forest plot showing the weight of each study in the plot. I use the code: library(metafor) data(dat.bcg) res <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg, measure="RR",

Re: [R] Mean effect size in meta-analysis using Metafor

2015-12-12 Thread Michael Dewey
Dear Carlijn I wonder whether http://www.metafor-project.org/doku.php/tips:comp_two_independent_estimates answers your question? If you had given us an example of your fitting procedure we might know for sure. On 12/12/2015 15:35, Carlijn . wrote: Hi all, I have a question about

Re: [R] Changing X axis values

2015-12-18 Thread Michael Dewey
Dear Amelia As well as Jim's excellent advice you may want to look at the las parameter which enables you to alter the orientation. Of course you then have to lie on your side to read them or turn your monitor through pi/2 On 18/12/2015 11:30, Jim Lemon wrote: Hi Amelia, The usual way is:

Re: [R] Make a box-whiskers plot in R with 5 variables, color coded.

2015-12-16 Thread Michael Dewey
As a speaker of the dialect of British English current in southern England I think: 1 - the generic term for all three is brackets. As a child I was taught the precedence rules for arithmetic operators by the mnemonic BODMAS (the O stands for 'of') 2 - careful speakers of the dialect who know

Re: [R] exact trend test

2016-01-07 Thread Michael Dewey
Have you tried Google? exact randomisation trend test r finds what look like clearly relevant packages On 07/01/2016 04:16, li li wrote: Hi all, Is there an R function that does exact randomization trend test? For example, consider the 2 by 5 contingency table below: dose0

Re: [R] Combining dataframes with different row numbers and plotting with ggplot2

2016-01-09 Thread Michael Dewey
, something like the attached picture. The command dosesn't lead me to this purpose. However, I'm really new here, could you please help me more on this? Thanks in advance, Maryam On Sat, Jan 9, 2016 at 5:38 PM, Michael Dewey <li...@dewey.myzen.co.uk <mailto:li...@dewey.myzen.co.uk&g

Re: [R] Combining dataframes with different row numbers and plotting with ggplot2

2016-01-09 Thread Michael Dewey
Dear Maryam If you just need all the values of size would c(df1$size, df2$size) work? On 08/01/2016 21:44, maryam moazam wrote: Dear Sir / Madam, I have just come to the amazing R software, so please be patient if my question is basic for you. I have 2 text file (say 1.txt and 2.txt), each

Re: [R] Which GLM to use with mixed predictor variables i.e. both discrete and continous

2016-01-09 Thread Michael Dewey
Dear Charles You showed us a call of glm with which you are presumably not satisfied. What happened to disappoint you? On 09/01/2016 09:55, Charles Thuo wrote: I have the following glm v_glm <- glm(claim_count~ave_age+cost+inc.count+p.statcount,data=v,family=poisson) claim_count -

Re: [R] Which GLM to use with mixed predictor variables i.e. bothdiscrete and continous

2016-01-09 Thread Michael Dewey
widely. In addition am not sure which link function to use. If the people who wrote R chose a default link then, since they know more about statistics than you or I, I suggest you use it unless you can think of a good reason to change. Charles On 9 Jan 2016 17:27, "Michael Dewey

Re: [R] exact trend test (enumerate all possible contingency tables with fixed row and column margins)

2016-01-07 Thread Michael Dewey
You received a number of suggestions about where to look and packages that might be suitable. Did you do that? If you did which ones did you look at and why did you reject them? On 07/01/2016 16:29, li li wrote: Thanks for all the reply. Below is the data in a better format. addmargins(dat)

Re: [R] metafor - Meta-Analysis of rare events / beta-binomial regression

2015-11-27 Thread Michael Dewey
Dear Markus This is not a direct answer to your question, I will leave that to Wolfgang but two thoughts: 1 - if all the studies have very sparse data @article{bradburn07, author = {Bradburn, M J and Deeks, J J and Berlin, J A and Localio, A R}, title = {Much ado about nothing: a

Re: [R] subset data using a vector

2015-11-23 Thread Michael Dewey
16:26, DIGHE, NILESH [AG/2362] wrote: Michael: I like to use the actual range id's listed in column "rangestouse" to subset my data and not the length of that vector. Thanks. Nilesh -Original Message- From: Michael Dewey [mailto:li...@dewey.myzen.co.uk] Sent: Monday, November 23

Re: [R] Metanalysis in R using MAVIS

2015-12-01 Thread Michael Dewey
Dear Ernesto As far as I understand it MAVIS is an application which uses metafor to perform the actual meta-analysis. I do not use MAVIS but if it gives you access to the full range of metafor facilities then you have a range of options with moderators. If MAVIS does not expose all of

Re: [R] convert.snp.ped in GenAbel

2015-12-01 Thread Michael Dewey
Dear Aoife I do not know the insides of GenABEL but it may be looking for the map file first so in fact may not be able to find the ped file either. 1 - Are you sure the files are named as you state? 2 - Are you sure they are placed in ~ which seems an unlikely place to put them. On

Re: [R] subset data using a vector

2015-11-23 Thread Michael Dewey
length(strsplit(as.character(mydata$ranges2use), ",")) was that what you expected? I think not. On 23/11/2015 16:05, DIGHE, NILESH [AG/2362] wrote: Dear R users, I like to split my data by a vector created by using variable "ranges". This vector will have the current range

Re: [R] for loop

2016-01-12 Thread Michael Dewey
have question if i have 700 dam and 30 sire. how can i write my ped thad dam use only once and sire use 20 time or 1:20 dam with sire 1 then 21:40 dam with sire 2 and … On Dey 22, 1394 AP, at 19:52, Michael Dewey <li...@dewey.myzen.co.uk> wrote: Dear Maryam sample(dam) would give you a

Re: [R] for loop

2016-01-12 Thread Michael Dewey
Dear Maryam sample(dam) would give you a random permutation of dams sample(c(sire, sire)) would give you a random permutation of sires, each twice. Does that help? On 12/01/2016 05:53, maryam firoozi via R-help wrote: Dear mr/madam I want to mak a matrix with 10 row and 3 column . this

Re: [R] Merging variables

2016-06-06 Thread Michael Dewey
X-Originating-<%= hostname %>-IP: [217.155.205.190] Dear Georg I find it a bit surprising that you end up with customer.x and customer.y. Can you share with us a toy example of two data.frames which exhibit this behaviour? On 06/06/2016 13:29, g.maub...@weinwolf.de wrote: Hi All, I merged

Re: [R] problem: the id of the data set

2016-06-09 Thread Michael Dewey
Perhaps I do not understand you correctly but why not create a variable for the id before you merge? On 09/06/2016 09:00, 周 可卫 wrote: I got the dataset after merge two old one .The id of the column isn’t just the number of the column.So when I identify some obs,I got the figure

Re: [R] Request for help

2016-06-04 Thread Michael Dewey
Dear Suparna You do not say whether the problem is (a) creating a help page to start with (b) understanding how to edit it afterwards. If the former then Duncan's advice to use prompt (or package.skeleton if you have not got anything set up yet) is good advice. If (b) then try it and post

[R] Fortune candidate, was Re: Shaded areas in R

2016-05-26 Thread Michael Dewey
In a reply Duncan said On 26/05/2016 16:12, Duncan Murdoch wrote: On 26/05/2016 11:03 AM, Óscar Jiménez wrote: You should try things; R won't break. Duncan Murdoch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] Regression and Sub-Groups Analysis in Metafor

2016-05-31 Thread Michael Dewey
In-line On 30/05/2016 19:27, Dan Kolubinski wrote: I am completing a meta-analysis on the effect of CBT on low self-esteem and I could use some help regarding the regression feature in metafor. Based on the studies that I am using for the analysis, I identified 4 potential moderators that I

Re: [R] Whether statistical background is must to learn R language

2016-05-31 Thread Michael Dewey
Dear Prasad If you want to use R to do statistics then statistical knowledge is essential. If you want to use R to do one of the many, many other things it can do then you only need knowledge of whichever of those is your target. On 31/05/2016 08:22, Prasad Kale wrote: Hi, I am very new to

[R] Urdu text problems, was Re: Query about Text Preprocessing (Encoding)

2016-05-29 Thread Michael Dewey
Would it be a good idea to mention Urdu in the subject line as other people who deal with Urdu, but not specifically text mining, may be able to help? I have added it to my reply On 29/05/2016 08:20, Khadija Shakeel wrote: i want to work with Urdu language but R is only displaying Urdu text

Re: [R] MCA, Rcmdr, FactoMineR

2016-02-10 Thread Michael Dewey
Sarah Bortolamiol wrote : > Dear John and R users, > > Thank you very much for your help > In my consol, i typed: > > install.packages("RcmdrPlugin.FactoMineR") > And got the following message > "Installing package(s) into

Re: [R] pearson correlation matrix

2016-02-05 Thread Michael Dewey
On 05/02/2016 17:10, emmanuelle morin wrote: ok, it will still make sense ? Whether it makes sense to correlate the people rather than the variables depends on the underlying science which (a) we do not know, and (b) is not really an R question. Le 05/02/2016 15:31, Michael Dewey

Re: [R] Help in meta-analysis (URGENT please)

2016-02-09 Thread Michael Dewey
Dear Rosa I suggest reformatting your dataset to have four variables (a) study (2) MSM yes or no (3) number with HIV (4) total number. Then you can use any of the options in metafor (look for outcomes for individual groups in ?escalc) and use MSM as a moderator. Is there any reason why you

Re: [R] pearson correlation matrix

2016-02-05 Thread Michael Dewey
Assuming your dataset is in a matrix you want to transpose it. So you can go t(mesdonnees) and then call cor on that. On 05/02/2016 14:06, emmanuelle morin wrote: Hello, I have a set of 12 individuals with thousands of variables measured. I understand that when I'm using the cor() function on

Re: [R] readRDS problem

2016-02-24 Thread Michael Dewey
the authors of R have locked it fails. On 24/02/2016 10:02, Sigbert Klinke wrote: Hi, thanks, using test <<- readRDS (name) it worked. But why? Best Sigbert Am 24.02.2016 um 10:39 schrieb Michael Dewey: Try calling it something other than data. On 24/02/2016 09:26, Sigbert Klinke wrote:

Re: [R] readRDS problem

2016-02-24 Thread Michael Dewey
Try calling it something other than data. On 24/02/2016 09:26, Sigbert Klinke wrote: Hi, I have two scripts, one creates a data structure (a list of data frames + some attributes) and saves it via saveRDS. The second script reads the RDS file (outside of any function) and data <- readRDS

Re: [R] Fwd: about dowloading a package.

2016-02-24 Thread Michael Dewey
Dear Carlos On 24/02/2016 11:11, Carlos Gracida Juarez wrote: Good morning, I have an issue with my computer in order to download a package. I've tried to download the "mosaicData" and by writing the command and using the install packages tab, and in the first gives ma a warning indication

Re: [R] trimmed mean and Winsorized mean

2016-01-21 Thread Michael Dewey
Dear Muhammad You could try an internet search which should lead you to several packages on CRAN which meet your need for Winsorisation. I used winsor cran but it may depend on what Google knows about you. On 21/01/2016 09:50, Muhammad Kashif wrote: Dear respected group members who we

Re: [R] Fwd:

2016-01-21 Thread Michael Dewey
Hello Maryam See below On 20/01/2016 21:26, maryam firoozi via R-help wrote: Hello, i made a population about 4500 individual. So you mean nearly 4500, not exactly 4500? this has two sex(female and male).they had pedigree. i wanted to enter new indiviual but their ID of indiviual mustnot

Re: [R] error message for every parenthesis

2016-02-16 Thread Michael Dewey
Dear Tara 1 - why did you install 3.2.1 when 3.2.3 is the latest version 2 - what happens if you delete .RData and .Rapp.history from your workspace? 3 - you do have a function try as it is part of R On 16/02/2016 02:49, Tara Kerin wrote: Hi, I seem to be having the same problem Garrett

Re: [R] missing values in csv file

2016-02-17 Thread Michael Dewey
Assuming it is a character variable test <- c("a", NA, "b") > test [1] "a" NA "b" > test[is.na(test)] <- " " > test [1] "a" " " "b" but if it is numeric this as, as others have said, almost certainly not what you really wanted to do On 17/02/2016 10:04, Jan Kacaba wrote: In my original

Re: [R] (no subject)

2016-03-13 Thread Michael Dewey
In line On 12/03/2016 16:02, Sudhansu Senapati wrote: library(caret) Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘pbkrtest’ I do not see how this message could be clearer. It means you do not have the package

Re: [R] Best Regression Technique to Use

2016-03-14 Thread Michael Dewey
Ajay Andrews wrote : You certainly _can_, whether you _should_ depends on the scientific question. I think you may need to consult someone familiar with your field of study for advice. > I have a set of independent variables that are all BINARY, and my dependent >

Re: [R] Statistical analysis of olive dataset

2016-03-13 Thread Michael Dewey
Dear Axel Since you are using princomp (among other things) you might find the biplot function useful on the output of princomp. I have not studies your code in detail but you do seem to be doing several things in multiple ways using functions from different sources. I wonder whether it

Re: [R] Information value

2016-03-09 Thread Michael Dewey
Just to help next time some comments in-line On 09/03/2016 14:31, Venky wrote: Hi I want to find the information value for my overall data. I have data like this.my data set name is data Best not to call your data.frame data as it may conflict with the function data() Id smoke

<    1   2   3   4   5   6   >