similar to: How could I use a function saved in one file ?

Displaying 20 results from an estimated 2000 matches similar to: "How could I use a function saved in one file ?"

2010 May 20
1
Mixed Effects Model on Within-Subjects Design
Dear R Experts, I am attempting to run a mixed effects model on a within-subjects repeated measures design, but I am unsure if I am doing it properly. I was hoping that someone would be able to offer some guidance. There are 5 independent variables (subject, condition, difficulty, repetition) and 1 dependent measure (value). Condition and difficulty are fixed effects and have 3 levels each
2011 Jul 12
1
problem plotting points based on different values
Hello Friends, I am new to R and stuck with a problem. i have two columns drug_A and drug_B, i have plotted a scatter plot using the ggplot2 function. My problem is with the third column, it is the p-value column. I want to color and size points differently based on the p_value, the p_value range is between 0<0.0001< 0.001<0.05<1. I used a script using the ifelse loop, but it
2008 Jul 23
2
Warning message in if else statement
Hi, I am using an if else statement inside a function ?. If I use that function I have no problems ?. If I use the function with the if else statement inside a second function I get the following waring: Warning message: In if (pval == 0) p_value <- "< 2.2e-16" else p_value <- pval : the condition has length> 1 and only the first element will be used Using the second
2015 Feb 25
4
DUDA LLENAR MATRIZ CREADA
Buena tarde, Estoy llevando a cabo un trabajo y no encuentro la forma de llenar una matriz con el p_value y un estadístico calculado. Un poco mas detallado, tengo muestras aleatorias, calculo por ejemplo la prueba t, wilcoxon, etc y requiero llevar por una parte los p_value de k muestras a una matriz creada anteriormente y por otro lado el valor del estadístico de las mismas k muestras a otra
2020 Oct 18
1
Resultado de la consola como un tibble
Hola, Bueno, puedes hacer el cálculo de una forma mucho más compacta y rápida. Esta forma es especialmente recomendable cuando tienes muchas columnas y muchas filas. > library(data.table) > myDT <- as.data.table(mtcars) > myDTlong <- melt(myDT, measure.vars=1:ncol(myDT)) > myDTlong[ , list(p_value = shapiro.test(value)$p.value, v_stat = shapiro.test(value)$statistic) , by
2013 Apr 05
2
retrieveing value from KS test
Hi. how can i insert the value of p_value from KS.test into vector? Regards, Irit. -- View this message in context: http://r.789695.n4.nabble.com/retrieveing-value-from-KS-test-tp4663439.html Sent from the R help mailing list archive at Nabble.com.
2009 Sep 17
1
Error message in Design library
This was working a few weeks ago, but perhaps the package has been updated since then. model.1 <- lrm(response ~ p_value, data=c_abl_oncogene_1_RTK) When I run the following command . . . . prediction.1 <- predict(model.1, type=c("fitted")) I get the following error message. . . . Error in predictDesign(object, ..., type = "lp", se.fit = FALSE) : could not find
2009 Apr 16
2
Help- extracting values
I have csv files imported in r each with 2 columns and many many rows. I have sorted the data in them but want to extract some values. The first column is an ID The second is a p-value ( now sorted in increasing order with NA's last) I want to extract the rows with a p-value of less than 0.05) What commands would help the table is called AnovaSort with column headings MCI & p-value Many
2008 Sep 08
0
Poisson Distribution - Chi Square Test for Goodness of Fit
Dear R-help,   Chi Square Test for Goodness of Fit     Problem Faced :   I have got a discrete data as given below (R script)   No_of_Frauds <-c 1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,2,1,2,2,2,1,1,2,1,1,1,1,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,2,1,1,1,1,1,1,1,3,2,1,1,1,2,1,1,2,1,1,1,1,1,2,1,3,1,2,1,2,14,2,1,1,38,3,3,2,44,1,4,1,4,1,2,2,1,3)   I am trying to fit
2008 Aug 29
0
Problem with Poisson - Chi Square Goodness of Fit Test - New Mail
Dear R-help, ? ? Chi Square Test for Goodness of Fit ? I have got a discrete data as given below (R script) ? No_of_Frauds<-c(1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,2,1,2,2,2,1,1,2,1,1,1,1,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,2,1,1,1,1,1,1,1,3,2,1,1,1,2,1,1,2,1,1,1,1,1,2,1,3,1,2,1,2,14,2,1,1,38,3,3,2,44,1,4,1,4,1,2,2,1,3) ? I am trying to fit Poisson distribution to
2008 Aug 29
0
Poisson Distribution - problem with Chi Square Goodness of Fit test
Chi Square Test for Goodness of Fit   I have got a discrete data as given below (R script)   No_of_Frauds<-c(1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,2,1,2,2,2,1,1,2,1,1,1,1,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,2,1,1,1,1,1,1,1,3,2,1,1,1,2,1,1,2,1,1,1,1,1,2,1,3,1,2,1,2,14,2,1,1,38,3,3,2,44,1,4,1,4,1,2,2,1,3)   I am trying to fit Poisson distribution to this data using R.  
2008 Aug 29
0
Please ignore earlier mail - [ Poisson - Chi Square test for Goodness of Fit]
Dear R-help, ? ? Chi Square Test for Goodness of Fit ? I have got a discrete data as given below (R script) ? No_of_Frauds<-c(1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,2,1,2,2,2,1,1,2,1,1,1,1,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,2,1,1,1,1,1,1,1,3,2,1,1,1,2,1,1,2,1,1,1,1,1,2,1,3,1,2,1,2,14,2,1,1,38,3,3,2,44,1,4,1,4,1,2,2,1,3) ? I am trying to fit Poisson
2007 Nov 22
3
anova planned comparisons/contrasts
Hi, I'm trying to figure out how anova works in R by translating the examples in Sokal And Rohlf's (1995 3rd edition) Biometry. I've hit a snag with planned comparisons, their box 9.4 and section 9.6. It's a basic anova design: treatment <- factor(rep(c("control", "glucose", "fructose", "gluc+fruct",
2020 Oct 18
2
Resultado de la consola como un tibble
Buen día estimados Estoy tratando de hacer un tibble con los resultados de un apply que se muestran en la consola que me da R, no estoy seguro si eso se pueda hacer, pero me gustaría organizar los resultados de esa manera. mi código es: data("mtcars") Mtcars_matriz <- as.matrix(mtcars) apply(Mtcars_matriz, MARGIN =2, FUN = shapiro.test) DF2 <- tibble(Variable = NA, W = NA, Pvalue =
2011 Mar 23
1
Function to crop p-values from multiple Anovas
Starting with data from a microarray experiment and I would like to analyse the influence of two factors (age, treatment) on gene expression. Looking through the r-help archives and the web I tried the following: I put my data in a dataframe similar to this one: > example.df <- as.data.frame(matrix(data=runif(32,100,1000), nrow=4, ncol=4)) > example.df <-
2007 Apr 30
3
Read every second line from ASCII file
Dear all, I have an ASCII file where records are separated by a blank. I would like to read those data; however, only the data in rows 1, 3, 5, 7, ... are important; the other lines (2,4,6,8,....) contain no useful information for me. So far I used awk/gawk to do it: gawk '{if ((FNR % 2) != 0) {print $0}}' infile.txt > outfile.txt What is the recommended way to accomplish this in R?
2007 Sep 05
4
Mocking to spec a sort_by method
Hello, I have a question regarding the use of Mocha with rSpec to spec one of my methods. My spec contains the following vehical1 = mock() vehical2 = mock() vehical1.stubs(:mph).returns(150) vehical2.stubs(:mph).returns(250) comparer.add_vehical([@vehical1, @vehical2]) comparer.sort_by(:mph) The comparer is an object that has a basic "stack like" functionality, add_vehical is the
2023 Mar 30
1
seqMK function
Hello does anyone know how to set the confidence level within the seqMK() function in the pheno package. It seems to be set automatically at 0.05 and there seems to be neither an input function to set a different level, as there are with some changepoint functions, nor an output to give one the p-value of the changepoint identification which you get with functions ie func$p_value etc ... Thanks
2013 Nov 25
0
R: lmer specification for random effects: contradictory reults
Dear Thierry, thank you for the quick reply. I have only one question about the approach you proposed. As you suggested, imagine that the model we end up after the model selection procedure is: mod2.1 <- lmer(dT_purs ~ T + Z + (1 +T+Z| subject), data =x, REML= FALSE) According to the common procedures specified in many manuals and recent papers, if I want to compute the p_values relative to
2013 Nov 25
4
lmer specification for random effects: contradictory reults
Hi All, I was wondering if someone could help me to solve this issue with lmer. In order to understand the best mixed effects model to fit my data, I compared the following options according to the procedures specified in many papers (i.e. Baayen <http://www.google.it/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDsQFjAA