Re: [R] Fisher's Test 5x4 table

2015-08-28 Thread Gerrit Eichner
, but it presumably # won't work because of your sample size. set.seed( 20150828) # for reproducibility fisher.test( W, simulate.p.value = TRUE, B = 1e5) # For B look at the help page. Finally: Did Minitab really report p 0.001? ;-) Hth -- Gerrit Dear all, I am trying to do a fishers test

[R] attribute color to a list

2015-08-28 Thread Karim Mezhoud
Hi, attriColorValue works with one value. I would like to get the color of a list with lappy but in input I have two variables (the value and the list). attriColorValue - function(Value, list, colors=c(a,b,c, d,e),feet){ list - round(list, digits = 0) Max - max(list, na.rm=TRUE)

Re: [R] Piecewise regression using segmented package plotted in xyplot

2015-08-28 Thread S Ellison
I perhaps should have added a stronger warning here; note that the model fitting in my previous post (below) uses explicit initial breakpoints for segmented (specifically, c(30,60) at line 1 of the get.segments() ). if you know where yours are, substitute them there. Otherwise, you'd need to

[R] Problem loading mvabund package

2015-08-28 Thread Suparna Mitra
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: install.packages(/Users/smitra/Documents/Soft/mvabund_3.10.4.tgz, repos = NULL, type=source) * installing *binary*

Re: [R] Piecewise regression using segmented package plotted in xyplot

2015-08-28 Thread S Ellison
There isn't an abline method for segmented, and even if there were you'd need segments() for a segmented line plot. You're going to have to roll your own. That will need a function to extract the break locations and predicted values at those points I don't have your data, so I can't do one

Re: [R] attribute color to a list

2015-08-28 Thread Jim Lemon
Hi Karim, I'm not sure that this is what is causing the error, but your list is actually a vector. The following runs, but the function is obviously not working: sapply(list, function(x) as.character(attriColorValue(x,list,colors=c(blue,white,red),feet=1))) There is probably a better name for

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] attribute color to a list

2015-08-28 Thread Karim Mezhoud
Hi, Thank you for comments. Yes it is a vector an not a list ;). I need to round also the input Value (Value - round(Value, digits=0). If not Matching is not possible. The vector is a real number and the color.df are Integer. Thanks for sapply is better than lapply in my case. Karim On Fri, Aug

Re: [R] heat map labeling

2015-08-28 Thread Jim Lemon
Hi Angela, Assuming the above data frame is named angela.df: angela.mat-as.matrix(angela.df[,2:3]) angela.mat-angela.mat[apply(angela.mat,1,function(x) all(x) 0),] will remove all of the rows that have contain at least one zero. Jim On Fri, Aug 28, 2015 at 9:00 AM, Angela via R-help

Re: [R] lsqlin in R package pracma

2015-08-28 Thread Hans W Borchers
I got interested in enabling the full funcionality that MATLAB's lsqlin() has, that is with equality and bound constraints. To replace an equality constraint with two inequality constraints will not work with solve.QP() because it requires positive definite matrices. I will use kernlab::ipop()

Re: [R] Fisher's Test 5x4 table

2015-08-28 Thread Gerrit Eichner
: unexpected '' in ). So, for me the following works (and it should also for you) and gives the shown output (after a very short while): Trapz - as.matrix( read.table( w.txt, head = T, row.names = Traps)) set.seed( 20150828) # For the sake of reproducibility. fisher.test( Trapz, simulate.p.value

[R-es] Un asunto al margen

2015-08-28 Thread heber sarmiento via R-help-es
Cordial Saludo He conversado con algunos amigos y me han comentado que existe una plataforma de trabajo colaborativo, algo parecido a schoology o edmode  la cual entre otras herramientas trae implementado a R y LaTeX, el problema es que no recuerdo el nombre y si bien entiendo que esta lista no

Re: [R] Rcpp, function signature

2015-08-28 Thread peter dalgaard
On 27 Aug 2015, at 17:40 , Dirk Eddelbuettel e...@debian.org wrote: Michael Meyer via R-help r-help at r-project.org writes: I am an (very) grateful user of Rcpp. Glad to hear that! But you are on the wrong mailing list. Please ask on rcpp-devel. But for the benefit of the rest of

Re: [R] Piecewise regression using segmented package plotted in xyplot

2015-08-28 Thread Duncan Mackay
Hi Without a reproducible example I am only guessing Try this xyplot(threshold ~ age |frequency.a, data=subset(rage !is.na(threshold} !is.na(age)), groups = HL, cex=0.5, layout=c(7,4), par.strip.tex=list(cex=0.8), xlab=Age (years), ylab=Threshold (dB

Re: [R] lsqlin in R package pracma

2015-08-28 Thread Berend Hasselman
Nice and interesting! Something to remember. Lesson (for me): Always first look in Task Views on CRAN. Choose Optimization and look at Mathematical Programming Solvers. Berend On 28 Aug 2015, at 12:56, Hans W Borchers hwborch...@gmail.com wrote: I got interested in enabling the full

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

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

2015-08-28 Thread agrima seth
i have a text file with data of the given format: white snow lived snow in snow lived place in place a place called place as place here i have to find the frequency of the terms only in the first column (i.e.) white - 1 lived- 2 in -2 a-1 called - 1 as -1 Could you please guide me how to do the

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

2015-08-28 Thread Sarah Goslee
Hi, On Fri, Aug 28, 2015 at 7:49 AM, agrima seth sethagr...@gmail.com wrote: i have a text file with data of the given format: white snow lived snow in snow lived place in place a place called place as place That doesn't specify the format. I can think of at least seven things that

Re: [R] Rcpp, function signature

2015-08-28 Thread Dirk Eddelbuettel
peter dalgaard pdalgd at gmail.com writes: But for the benefit of the rest of us: A NumericVector is a pointer, right? Effectively even though it is not treated as one by the users. But you know what P in SEXP stands for, and Rcpp objects really are what we call proxy objects for the

Re: [R] Referencing a component of a large object (Error: slot NULL)

2015-08-28 Thread William Dunlap
s - paste('chain:,j,' ,sep=) You don't want the single quotes around the string you are constructing. Try s - paste0(chain:, j) which will give you, e.g., chain:1 instead of 'chain:1' Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, Aug 28, 2015 at 6:08 PM, Andrea Lamont

[R] Change the maximum likelihood of multinomial logic model in R

2015-08-28 Thread Alaa Sindi
Dear all, Can anyone help me to change the maximum likelihood of multinomial logic model in R? Thanks __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Change the maximum likelihood of multinomial logic model in R

2015-08-28 Thread Alaa Sindi
Dear All, can anybody help me with an example on how to use mlogit.optim? Regards On Aug 28, 2015, at 9:00 PM, Alaa Sindi alaasi...@gmail.com wrote: Dear all, Can anyone help me to change the maximum likelihood of multinomial logic model in R? Thanks

Re: [R] heat map labeling

2015-08-28 Thread Jim Lemon
Hi Angela, It depends upon what you want to illustrate. If you are just interested in the relative values, you can suppress the labels. One solution is to create a very high PDF to look at the colors, which you could then expand and scroll around to see the labels. Jim On Sat, Aug 29, 2015 at

[R] Multiple Integrals

2015-08-28 Thread Shant Ch via R-help
Hello all, For a study I want to find E|X1/3+X2/3+X3/3-X4| for variables following lognormal distribution. To get the value we need to use four integrals. This is the code which I is used   fx-function(x){     dlnorm(x,meanlog=2.185,sdlog=0.562)   } U31-integrate(function(y1) {

[R] kknn::predict and kknn$fitted.values

2015-08-28 Thread Jonathan Henkelman
I am noticing that there is a difference between the fitted.values returned by train.kknn, and the values returned using predict with the same model and dataset. For example: data (glass) tmp - train.kknn(Type ~ ., glass, kmax=1, kernel=rectangular, distance=1) tmp$fitted.values [[1]] [1] 1

[R] Referencing a component of a large object (Error: slot NULL)

2015-08-28 Thread Andrea Lamont
I am running a simulation and need to refer to a matrix of parameters from a large object. Here is a snippet of the object structure itself: Formal class 'mi' [package mi] with 3 slots ..@ call : language .local(y = y, n.chains = ..2, max.minutes = 2) ..@ data :List of 100

Re: [R] Change the maximum likelihood of multinomial logic model in R

2015-08-28 Thread Don McKenzie
Have you looked at the help for mlogit.optim? At the minimum you need a likelihood function and starting value(s). If you don’t understand the function syntax you may have difficulty interpreting any output that you do get. On Aug 28, 2015, at 11:26 AM, Alaa Sindi alaasi...@gmail.com wrote:

[R] Separate point sizes in rgl.points()?

2015-08-28 Thread Atte Tenkanen
Hi, DrawDensity3D-function in package VecStatGraphs3D utilizes rgl.points-function {rgl}: function (vectors, Div = 40, Layers = 3, DrawAxes = FALSE) { open3d(windowRect = c(100, 100, 800, 800)) bg3d(white) Cx = vectors[, 1] Cy = vectors[, 2] Cz = vectors[, 3] Cr -

Re: [R] heat map labeling

2015-08-28 Thread Angela via R-help
Hi Jim, Thank you, that definitely reduced it but there are still about 600 genes, so too many to label. It does make the heat map itself look cleaner. Maybe labeling isn't necessary for the heat map? -Angela On Fri, 8/28/15, Jim Lemon

Re: [R] Referencing a component of a large object (Error: slot NULL)

2015-08-28 Thread William Dunlap
tf - vector(list, numberofchains) for (j in 1:numberofchains){ s - paste('chain:,j,' ,sep=) tf[[j]] = mi.control.i@data$s@variables$y.obs.tx@parameters[30,] } If you want the component whose name is the value of the variable 's' use data[[s]]. The syntax 'data$s' means to get

Re: [R] Problem loading mvabund package

2015-08-28 Thread Suparna Mitra
Thank you Michael :) S On 28 August 2015 at 12:09, Michael Dewey li...@dewey.myzen.co.uk wrote: 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,

Re: [R] Change the maximum likelihood of multinomial logic model in R

2015-08-28 Thread David Winsemius
On Aug 28, 2015, at 11:26 AM, Alaa Sindi wrote: Dear All, can anybody help me with an example on how to use mlogit.optim? That is just a helper function. The examples are all on the mogit help page. On Aug 28, 2015, at 9:00 PM, Alaa Sindi alaasi...@gmail.com wrote: Dear all, Can

[R] Referencing a component of a large object (Error: slot NULL)

2015-08-28 Thread Andrea Lamont
I am running a simulation and need to refer to a matrix of parameters from a large object. Here is a snippet of the object structure itself: Formal class 'mi' [package mi] with 3 slots ..@ call : language .local(y = y, n.chains = ..2, max.minutes = 2) ..@ data :List of 100

[R-es] Una inquietud

2015-08-28 Thread heber sarmiento via R-help-es
Estoy elaborando un pequeño script en el que pido a los usuarios introducir un conjunto de valores, esto lo estoy haciendo con la función cat() el asunto es que no se como hacer para que luego de leídos, ellos sean asignados a un vector x-c(???...??)   agradezco cualquier orientación y desde ya

[R-es] una ayudita

2015-08-28 Thread heber sarmiento via R-help-es
Estoy elaborando un pequeño script en el que pido a los usuarios introducir un conjunto de valores, esto lo estoy haciendo con la función cat() el asunto es que no se como hacer para que luego de leídos, ellos sean asignados a un vector x-c(???...??)   agradezco cualquier orientación y desde ya