similar to: Check value interval in a if loop

Displaying 20 results from an estimated 2000 matches similar to: "Check value interval in a if loop"

2009 Sep 30
1
Read header csv file
Hi R community, First of all, I want to thank everybody to share their time solving R questions, You are great. Ok, for my questions, I've been looking for a solutions by myself, in forums but I'm just a little bit desesperate so I hope somebody can help me. I have built a code to read files from a directory. These files are named by a year (2004.csv, 2005.csv,...). When the code reads
2013 Mar 13
1
multi-comparison of means
Hi all: I have a question about multi-comparison. The data is in the attachment. My purpose: Compare the predicted means of the 3 methods(a,b,c) pairwisely. I have 3 ideas: #idea1 result_aov<-aov(y~ method + x1 + x2) TukeyHSD(result_aov) diff lwr upr p adj b-a 0.845 0.5861098 1.1038902 0.0000001 c-a 0.790 0.5311098 1.0488902 0.0000002 c-b -0.055 -0.3138902
2011 Mar 29
2
List extraction
I have created a list of tables with the same columns but different number of row. Example (actual list has ~200 elements): > temp1<- data.frame(ID=c("Herb","Shrub"),stat=c(4,5),pvalue=c(.03,.04)) > temp2<- data.frame(ID=c("Herb","Shrub", > "Tree"),stat=c(12,15,13),pvalue=c(.2,0.4,.3)) > L<-list(a=temp1,b=temp2) > L $a
2006 Jul 16
2
Matrices given to pt? [was: [R] for loops and counters]
Hi, people. I was a bit intrigued by the message quoted below. Indeed, if pt() is given a matrix, it returns a matrix. Should this feature be documented? ?pt speaks about "a vector of quantiles", and says nothing about the type of what it returns. The same might presumably apply to other distribution-related functions. ----- Forwarded message from Martyn Plummer <plummer at
1999 Oct 05
2
for loops and counters
I am trying to assign values to a vector (pvalue). Similar code works in C but not in R. What am I doing wrong? r <- pvalue <- 0 for(i in (1:(k-1))){ for(j in (i+1):k){ r <- r+1 tstat <- (means[i]-means[j])/rms pvalue[r] <- 2*(1-pt(abs(tstat),df)) } } Thank you. Peter B. -- Peter B. Mandeville mandevip at deimos.tc.uaslp.mx Jefe del
2007 Jul 07
1
Minor bug in lillie.test from nortest package (PR#9784)
Full_Name: David Sterling Version: 2.4.0 OS: OS X Submission from: (NULL) (64.81.102.199) lillie.test() dies without grace producing the error message: 'Error in if (pvalue > 0.1) { : missing value where TRUE/FALSE needed' when passed a vector of identical values. Examples: > lillie.test(c(0,0,0,0,0,0,0,0,0,0)) Error in if (pvalue > 0.1) { : missing value where TRUE/FALSE
2006 Nov 08
2
interprete wilcox.test results
Dear All, I am using wilcox.test to test two samples, data_a and data_b, earch sample has 3 replicates, suppose data_a and data_b are 20*3 matrix. Then I used the following to test the null hypothesis (they are from same distribution.): wilcox.test(x=data_a, y=data_b, alternative="g") I got pvalue = 1.90806170863311e-09. When I switched data_a and data_b by doing the following:
2007 Jun 11
1
epitools and R 2.5
At work after updating to R 2.5 I get an error using epitab from package epitools, when at home (R 2.4) I get no error. Could someone help me? Thanks Pietro Bulian Servizio di Onco-Ematologia Clinico-Sperimentale I.R.C.C.S. Centro di Riferimento Oncologico Via Franco Gallini 2 33081 Aviano (PN) - Italy phone: +39 0434 659 412 fax: +39 0434 659 409 e-mail: pbulian at cro.it (at work)
2009 Jan 04
1
Lattice xyplot help please.
Hi - I am not R expert and I would appreciate your time if you can help me about my xyplot question. I would like to add text (p-value) in a 4 panels xyplot. I thought panel = function{} should work but I am not sure where I did it wrong. The error message from the following code is "Argument subscripts is missing with no default values" xyplot(GLG ~ PD | factor(TRT) , groups =
2007 Dec 31
2
help on ROC analysis
Dear all, Some functions like 'ROC(Epi)' can be used to perform ROC analyssi, but it needs us to specify the fitting model in the argument. Now i have got the predicted p-values (0,1) for the 0/1 response variable using some other approach, see the following example dataset: id mark predict.pvalue 1 1 0.927 2 0 0.928 3 1 0.928 ..................
2010 Feb 24
1
extracting results from wilcox_test (package::coin)
Recently, I ran a series of Kruskal-Wallace tests [kruskal.test()] using by() to group by site Output is a list: >Herb.KW Herb.df$ID: 10-1 Kruskal-Wallis rank sum test data: Indicator_Rating by Year Kruskal-Wallis chi-squared = 15.24, df = 7, p-value = 0.03302 ----------------------------------------------------------------------------------------------------- Herb.df$ID: 18-1
2017 Jun 29
3
Help : glm p-values for a factor predictor
Hello, i am a newby on R and i am trying to make a backward selection on a binomial-logit glm on a large dataset (69000 lines for 145 predictors). After 3 days working, the stepAIC function did not terminate. I do not know if that is normal but i would like to try computing a "homemade" backward with a repeated glm ; at each step, the predictor with the max pvalue would be
2009 Jul 28
2
formatting in r
Hello, I have output that I want to print out. I am having a few issues. 1] output u to power is really nothing more than a 2 x 11 set of values formed using cbind function and printed out as a data frame How can I get it to output over several lines such as seen here? 2] Critical Z etc. were added by hand. I need an example of how I can mix alphanumeric and numeric data on
2011 Aug 01
1
Write.table Question
Hi, I'm trying to create an abbreviated data file from a larger version. I can use the subset command to create a value for this data: dat <-subset(raw.data, select=c(SNP, Pvalue)) > head (dat) SNP Pvalue 1 rs11 0.6516 2 rs12 0.3311 3 rs13 0.5615 but when I try to write.table using: write.table (dat, file = "/path/to/my/data.txt", sep = " ",
2017 Jun 29
0
Help : glm p-values for a factor predictor
It might help if you provided the code you used. It's possible that you didn't use direction="backward" in stepAIC(). Or if you did, it was still running, so whatever else you try will still be slow. The statement "R provides only the pvalues for each level" is wrong: look at the anova() function. Bob On 29 June 2017 at 11:13, Beno?t PELE <benoit.pele at
2006 Oct 25
1
density plot text
Is there any way of adding text to a density plot? I have had a go using the text() function but I think the error is because this function doesn't work with densityplot(). Alternatively, I understand I can achieve pretty much the same result if I plot a density kernel estimate using plot() (which allows text()), but I do prefer densityplot(). Also, is it possible to specify the dimensions
2005 Apr 20
1
negative p-values from fisher's test (PR#7801)
Full_Name: Martha Nason Version: 2.0.1 OS: Windows XP Submission from: (NULL) (137.187.154.154) I am running simulations using fisher's test on 2 x c tables and a very small p.value from fisher's test (<2.2e-16) is returned as a negative number. Code follows. > set.seed(0) > nreps.outer <-7 > pvalue.fisher <- rep(NA,nreps.outer) > > population1 <- c(
2011 Jan 14
2
read in data, maintain decimal places
Good day, All, Is there any way to maintain the number of decimal places in the type of situation below? I would like to maintain the number of decimal places in 0.667, despite the fact that its column-mates have a fourth decimal place. Thank you for your time. Jim dat.txt contents: MARKER ALLELES FREQ1 RSQR EFFECT2 STDERR CHISQ PVALUE rs6599753 C,T
2011 Mar 28
2
Questions about 'igraph' package.......
I am using 'igraph' package to make some graphs of 'gene-gene interaction'. I can get a data.frame which has three columns. gene1 gene2 pvalue AGT MLR 1.2e-04 MLR 11BHSD1 1.71e-05 IFG2 11BHSD2 2.2e-07 . . . . . . . . . AGTR1 NPPA
2013 May 16
2
R looping help
Hey I'm not really sure what I should put on here, but I am having trouble with my R code. I am trying to get the p-values, R^2s etc for a number of different groups of variables that are all in one dataset. This is the code: #Stand counter st<-1 #Collections stands<-numeric(67) slopes<-numeric(67) intercepts<-numeric(67) mses<-numeric(67) rsquares<-numeric(67)