similar to: Problem with <= (less than or equal): not giving the expected result

Displaying 20 results from an estimated 20000 matches similar to: "Problem with <= (less than or equal): not giving the expected result"

2016 Apr 05
1
Problem with <= (less than or equal): not giving the expected result
Thanks! On 05 Apr 2016, at 16:07, Thierry Onkelinx <thierry.onkelinx at inbo.be<mailto:thierry.onkelinx at inbo.be>> wrote: You could use something like this x <- abs(0.95 - 1) treshold <- 0.05 x < treshold | abs(x - treshold) < 1e-6 ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie &
2016 Apr 06
0
Problem with <= (less than or equal): not giving the expected result
> Apparently, abs(1 - 0.95) is not equal to 0.05, which I find however quite > disturbing. It's normal.* See R FAQ 7.31 in the html help system. S Ellison *... and common to all computers that use binary. ******************************************************************* This email and any attachments are confidential. Any use, copying or disclosure other than by the intended
2016 Apr 05
3
Problem with <= (less than or equal): not giving the expected result
Thanks Adrian and Thierry (from the previous answer). I was aware of the all.equal function, but there is nothing similar for <= (e.g. all.smallerEqual)? cheers, jo On 05 Apr 2016, at 14:31, Adrian Du?a <dusa.adrian at unibuc.ro<mailto:dusa.adrian at unibuc.ro>> wrote: Yes, that does have to do with floating point representation. I use this function for these types of
2016 Apr 05
0
Problem with <= (less than or equal): not giving the expected result
You could use something like this x <- abs(0.95 - 1) treshold <- 0.05 x < treshold | abs(x - treshold) < 1e-6 ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in the statistician after the experiment is
2016 Apr 05
0
Problem with <= (less than or equal): not giving the expected result
Yes, that does have to do with floating point representation. I use this function for these types of comparisons (works with values as well as with vectors): check.equal <- function(x, y) { check.vector <- as.logical(unlist(lapply(x, all.equal, y))) check.vector[is.na(check.vector)] <- FALSE return(check.vector) } See: ?all.equal Hth, Adrian On Tue, Apr 5, 2016 at 2:34 PM,
2018 Feb 08
2
plotting the regression coefficients
Hi Petr; Thanks so much. Exactly this is what I need. I will play to change color and so on but this backbound is perfect to me. I do appreciate your help and support. Regards, Greg On Thu, Feb 8, 2018 at 1:29 PM, PIKAL Petr <petr.pikal at precheza.cz> wrote: > Hi > > I copied your values to R, here it is > > > > > dput(temp) > > > > temp <-
2018 Feb 08
2
plotting the regression coefficients
Hi Petr; Thanks for your reply. It is much appreciated. A small example is given below for 4 independent and 4 dependent variables only. The values given are regression coefficients.I have looked ggplot documents before writing to you. Unfortunately, I could not figure out as my experience in ggplot is ignorable Regards. Greg y1 y2 y3 y4 x1 -0.19 0.40 -0.06 0.13 x2 0.45 -0.75 -8.67 -0.46 x3
2017 Jun 20
3
error while creating a simple graph
Dear All, I am learning R so it's a very simple problem but I do not understand while I am not able to generate a graph from two vectors. when I type this code, it generates a very nice graph. pdf("mygraph.pdf") > attach(mtcars) > plot(wt,mpg) > abline(lm(mpg~wt)) > title("Regreesion of mpg") > detach(mtcars) > dev.off() But I am trying to create a
2017 Oct 20
1
Error messages using nonlinear regression function (nls)
Hi Keep your messages in the list, you increase your chance to get some answer. I changed your data to groupedData object (see below), but I did not find any problem in it. plot(wlg) gives reasonable picture and I am not such expert to see any problem with data. Seems to me, that something has to be wrong with nlsList function. > wheat.list <- nlsList(Prop ~ SSlogis(end,Asym, xmid,
2018 Feb 12
2
plotting the regression coefficients
Hi Maybe there are other ways but I would split data to several chunks e.g. in list and use for cycle to fill multipage pdf. With the toy data something like library(reshape2) library(ggplot2) temp <- melt(temp) temp.s<-split(temp, cut(1:nrow(temp), 2)) pdf("temp.pdf") for (i in 1: length(temp.s)) { p <- ggplot(temp.s[[i]], aes(x=par1, y=variable, size=abs(value),
2018 Feb 10
0
plotting the regression coefficients
Hi Peter; The R code you provided works very well. Once again thanks so much for this. The number of variables in my data set that should appear on the y-axis is 733 and they are not numerical (for example the name of one variable is *palmitoyl-arachidonoyl-glycerol (16:0/20:4) [1]**. So, the plot looks very messy in one page. How can I make the plot to print out on multiple pages? Regards,
2017 Aug 16
5
strange behaviour read.table and clipboard
Hi Duncan The simples spreadsheet is: Put a name in the cell, let say "a1" Put number e.g. 1 below "a1" Copy the number to enough rows Select this column and press ctrl-c result is > temp<- read.delim("clipboard") > str(temp) 'data.frame': 1513 obs. of 1 variable: $ a1: Factor w/ 2 levels "1","a1": 1 1 1 1 1 1 1 1 1 1 ...
2016 Apr 03
2
use one way ANOVA to select genes
i want to select the significant genes form ?5 clusters (groups) by one way ANOVA ?in r####################################################################################### # i want use One way ANOVA to select the siginificant from the clusters above? selectgene <- function(GropuData,pvalue=0.05, na.rm=TRUE, file=1:5){# if each gruop in one ?txt file ?? ??? ? ??? ? fdata <-
2017 Jul 10
4
fit lognorm to cdf data
Dear all I am struggling to fit data which form something like CDF by lognorm. Here are my data: proc <- c(0.9, 0.84, 0.5, 0.16, 0.1) size <- c(0.144, 0.172, 0.272, 0.481, 0.583) plot(size, proc, xlim=c(0,1), ylim=c(0,1)) fit<-nls(proc~SSfpl(size, 1, 0, xmid, scal), start=list(xmid=0.2, scal=.1)) lines(seq(0,1,.01), predict(fit, newdata=data.frame(sito=seq(0,1,.01))), col=2) I tried
2017 Jul 04
6
R and UBUNTU startup
Dear all I have 3 questions. Due to some reason I switched from Vista to Ubuntu on home PC. I was used to start with Rgui.exe. However I am not able to find it under Ubuntu and R starts as terminal (probably Rterm). Question 1. Is Rgui.exe available on linux? In Windows doc folder I can find manuals, however I did not find doc folder in Ubuntu. I found somewhere that manuals need to be
2018 Feb 08
0
plotting the regression coefficients
Hi I copied your values to R, here it is > dput(temp) temp <- structure(list(par1 = structure(1:4, .Label = c("x1", "x2", "x3", "x4"), class = "factor"), y1 = c(-0.19, 0.45, -0.09, -0.16), y2 = c(0.4, -0.75, 0.14, -0.01), y3 = c(-0.06, -8.67, 1.42, 2.21), y4 = c(0.13, -0.46, 0.06, 0.06)), .Names = c("par1", "y1",
2017 Jun 02
1
Upper bands and lower bands
Sorry, For me a vector is a matrix with mx1 dimmensions. But it is true that it is not the way I correctly must talk in R. Can you guide me in what I?m trying to do? I?m trying to find what I want in Excel using something like a parabolic function but dind?t get yet (then to try to replicate in R). 2017-06-02 7:01 GMT+02:00 Bert Gunter <bgunter.4567 at gmail.com>: > Bert Gunter >
2017 Aug 17
2
strange behaviour read.table and clipboard
Hi > -----Original Message----- > From: Robert Baer [mailto:rbaer at atsu.edu] > Sent: Wednesday, August 16, 2017 3:04 PM > To: PIKAL Petr <petr.pikal at precheza.cz>; Duncan Murdoch > <murdoch.duncan at gmail.com> > Cc: r-devel at r-project.org > Subject: Re: [Rd] strange behaviour read.table and clipboard > > You said, "put a name in the cell".
2018 Feb 16
2
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi Petr; I would like to get a plot with names as they are in the original file. They are chemical names and I have 733 in the my file. For example, let me give to chemical names "*2-hydroxybutyrate/2-hydroxyisobutyrate*" and "*palmitoyl-arachidonoyl-glycerol (16:0/20:4) [1]**" .So, what should I put [c(2,3,1)] part in the command: iris$MySpecies<-factor(iris$Species,
2017 Aug 15
2
strange behaviour read.table and clipboard
Dear all I used to transfer data from excel to R by simple ctrl-c and read.delim("clipboard") construction. I know it is a bad practice but it is easy and for quick exploratory work it is OK. However after changing to new R devel few days ago I encountered weird behaviour. I tried one or two columns. In case of 2 columns, header is repeated after 526 items >