* using log directory 'd:/Rcompile/CRANpkg/local/2.15/swst.Rcheck' * using R version 2.15.0 (2012-03-30) * using platform: x86_64-pc-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'swst/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'swst' version '0.0.2' * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking whether package 'swst' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking for portable file names ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * loading checks for arch 'i386' ** checking whether the package can be loaded ... OK ** checking whether the package can be loaded with stated dependencies ... OK ** checking whether the package can be unloaded cleanly ... OK ** checking whether the namespace can be loaded with stated dependencies ... OK ** checking whether the namespace can be unloaded cleanly ... OK * loading checks for arch 'x64' ** checking whether the package can be loaded ... OK ** checking whether the package can be loaded with stated dependencies ... OK ** checking whether the package can be unloaded cleanly ... OK ** checking whether the namespace can be loaded with stated dependencies ... OK ** checking whether the namespace can be unloaded cleanly ... OK * checking for unstated dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... WARNING 'data(package=)' call not declared from: 'MASS' * checking examples ... ** running examples for arch 'i386' ... ERROR Running examples in 'swst-Ex.R' failed The error most likely occurred in: > ### Name: swst > ### Title: swst:LaTeX code for statistical reference This function attempts > ### to extract information on statistic, degrees of freedom and p-value > ### from a given object, and returns a LaTeX code. This function attemps > ### to extract information needed to make a LaTeX code of the statistic > ### in the following format (for an F value): (F(df1,df2)=..., p=...) > ### Some arguments can be passed to 'swp' to modify the way the statistic > ### is printed. For example, 'digits' an be used to change the amount of > ### digits printed and 'sig' can be used to change the way to show only > ### significance cutoff scores. For example, with p=0.02 this would > ### return: (F(df1,df2)=..., p<0.05) This is aimed to facilitate the use > ### of Sweave especially for users new to R. This is currently in > ### development and is so far only a few commonly used statistics are > ### implemented, but this should change in future versions. If you have > ### any ideas on other ways to facilitate using Sweave (except of course > ### existing methods such as xtable) please contact me. Also, if you know > ### of an object that is not implemented please contact me as well. If > ### you supply me a small piece of code that extracts the statistic, > ### degrees of freedom and p-value from that object I will include you in > ### the author list. > ### Aliases: swst swst.anova swst.Anova.mlm swst.aov swst.default > ### swst.htest swst.lm > > ### ** Examples > > ### Using examples from documentation of the used functions > # t-test: > require(graphics) > tTest <- t.test(1:10,y=c(7:20)) > > swst(tTest) [1] "($t(21.982)=-5.435$, $p<0.001$)" > > # Significance: > swst(tTest,sig=TRUE) [1] "($t(21.982)=-5.435$, $p<0.001$)" > > tTest <- t.test(1:10,y=1:10) > swst(tTest,sig=TRUE) [1] "($t(18)=0$, ns)" > > # Correlation test: > ## Hollander & Wolfe (1973), p. 187f. > ## Assessment of tuna quality. We compare the Hunter L measure of > ## lightness to the averages of consumer panel scores (recoded as > ## integer values from 1 to 6 and averaged over 80 such values) in > ## 9 lots of canned tuna. > > x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1) > y <- c( 2.6, 3.1, 2.5, 5.0, 3.6, 4.0, 5.2, 2.8, 3.8) > > ## The alternative hypothesis of interest is that the > ## Hunter L value is positively associated with the panel score. > corTest <- cor.test(x, y, method = "kendall", alternative = "greater") > > swst(corTest) [1] "($T=26$, $p=0.06$)" > > # Chi-square test: > M <- as.table(rbind(c(762, 327, 468), c(484,239,477))) > dimnames(M) <- list(gender=c("M","F"), + party=c("Democrat","Independent", "Republican")) > chisqTest <- chisq.test(M) > > swst(chisqTest) [1] "($\\\\chi^2(2)=30.07$, $p<0.001$)" > > # Linear model: > ## Annette Dobson (1990) "An Introduction to Generalized Linear Models". > ## Page 9: Plant Weight Data. > ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) > trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) > group <- gl(2,10,20, labels=c("Ctl","Trt")) > weight <- c(ctl, trt) > lm.D9 <- lm(weight ~ group) > lm.D90 <- lm(weight ~ group - 1) # omitting intercept > > swst(lm.D9) [1] "($F( 1,18)=1.419$, $p=0.249$)" > swst(lm.D90) [1] "($F( 2,18)=485.051$, $p<0.001$)" > > # ANOVA: > ## From Venables and Ripley (2002) p.165. > utils::data(npk, package="MASS") Error in find.package(package, lib.loc, verbose = verbose) : there is no package called 'MASS' Calls: -> find.package Execution halted ** running examples for arch 'x64' ... ERROR Running examples in 'swst-Ex.R' failed The error most likely occurred in: > ### Name: swst > ### Title: swst:LaTeX code for statistical reference This function attempts > ### to extract information on statistic, degrees of freedom and p-value > ### from a given object, and returns a LaTeX code. This function attemps > ### to extract information needed to make a LaTeX code of the statistic > ### in the following format (for an F value): (F(df1,df2)=..., p=...) > ### Some arguments can be passed to 'swp' to modify the way the statistic > ### is printed. For example, 'digits' an be used to change the amount of > ### digits printed and 'sig' can be used to change the way to show only > ### significance cutoff scores. For example, with p=0.02 this would > ### return: (F(df1,df2)=..., p<0.05) This is aimed to facilitate the use > ### of Sweave especially for users new to R. This is currently in > ### development and is so far only a few commonly used statistics are > ### implemented, but this should change in future versions. If you have > ### any ideas on other ways to facilitate using Sweave (except of course > ### existing methods such as xtable) please contact me. Also, if you know > ### of an object that is not implemented please contact me as well. If > ### you supply me a small piece of code that extracts the statistic, > ### degrees of freedom and p-value from that object I will include you in > ### the author list. > ### Aliases: swst swst.anova swst.Anova.mlm swst.aov swst.default > ### swst.htest swst.lm > > ### ** Examples > > ### Using examples from documentation of the used functions > # t-test: > require(graphics) > tTest <- t.test(1:10,y=c(7:20)) > > swst(tTest) [1] "($t(21.982)=-5.435$, $p<0.001$)" > > # Significance: > swst(tTest,sig=TRUE) [1] "($t(21.982)=-5.435$, $p<0.001$)" > > tTest <- t.test(1:10,y=1:10) > swst(tTest,sig=TRUE) [1] "($t(18)=0$, ns)" > > # Correlation test: > ## Hollander & Wolfe (1973), p. 187f. > ## Assessment of tuna quality. We compare the Hunter L measure of > ## lightness to the averages of consumer panel scores (recoded as > ## integer values from 1 to 6 and averaged over 80 such values) in > ## 9 lots of canned tuna. > > x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1) > y <- c( 2.6, 3.1, 2.5, 5.0, 3.6, 4.0, 5.2, 2.8, 3.8) > > ## The alternative hypothesis of interest is that the > ## Hunter L value is positively associated with the panel score. > corTest <- cor.test(x, y, method = "kendall", alternative = "greater") > > swst(corTest) [1] "($T=26$, $p=0.06$)" > > # Chi-square test: > M <- as.table(rbind(c(762, 327, 468), c(484,239,477))) > dimnames(M) <- list(gender=c("M","F"), + party=c("Democrat","Independent", "Republican")) > chisqTest <- chisq.test(M) > > swst(chisqTest) [1] "($\\\\chi^2(2)=30.07$, $p<0.001$)" > > # Linear model: > ## Annette Dobson (1990) "An Introduction to Generalized Linear Models". > ## Page 9: Plant Weight Data. > ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) > trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) > group <- gl(2,10,20, labels=c("Ctl","Trt")) > weight <- c(ctl, trt) > lm.D9 <- lm(weight ~ group) > lm.D90 <- lm(weight ~ group - 1) # omitting intercept > > swst(lm.D9) [1] "($F( 1,18)=1.419$, $p=0.249$)" > swst(lm.D90) [1] "($F( 2,18)=485.051$, $p<0.001$)" > > # ANOVA: > ## From Venables and Ripley (2002) p.165. > utils::data(npk, package="MASS") Error in find.package(package, lib.loc, verbose = verbose) : there is no package called 'MASS' Calls: -> find.package Execution halted