[R] error with hmm()?
Hello R users, I am suing library(hmm.discnp) I have a vector y " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 [741] 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 2 2 1 0 0 0 0 0" So I did y=y+1 (Otherwise R crahsed) "... 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1 1 [741] 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 3 3 2 1 1 ..." I try to fit a hidden markov model with two states. hmm(y,K=2) and this is what I get Error in FUN(X[[1L]], ...) : subscript out of bounds? where is my error? Thanks, below is the system I use. version.string R version 2.8.1 (2008-12-22) platform i686-suse-linux-gnu [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Convert to time from epoch
Hello R users, Is anyone familiar with an R function that converts a time expression ( POSIx for example ) to time (seconds/minutes) from epoch? I was unable to find any Best, Alon [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] No parametric methods
Hello I am interested in finding out a method of power analysis (effect size and sample size calculation ) using R in non parametric methods? I am running R 2.8.1 running on linux open SUSE Any libraries or documentation , I was not bale to google up any. Thanks in Advance, Ben-Ari Alon, MD University of Pittsburgh. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] adding p-value to a correlogram
Hello, I am trying to plot a correlogram and add the correlation coefficient and p-value. This is the code I am using : pairs(d, gap = 0, lower.panel = panel.smooth, upper.panel = function (x,y) { panel.smooth(x,y) par(usr = c(0, 1, 0, 1)) a <- cor(x,y,use="pairwise.complete.obs",method="spearman") a.p.value=cor.test(x,y,use="pairwise.complete.obs",method="kendall") text(.1,.9, adj=c(0,1), round(a, digits=2), col='blue', cex=2*a) text (0.9,0.9,round(a.p.value,digits=2),col='blue',cex=2*a.p.value) }) I get the error In cor.test.default(x, y, use = "pairwise.complete.obs", method = "kendall") : Cannot compute exact p-value with ties And it will not print the p-values. Any ideas how to work around this issue? R:2.8 Linux openSUSE 11.1 Thanks, Alon __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Problem using strptime
Hello I am trying to read a date and time from a file and convert them to POSIXct using strptime() the dates are stored in t which is a factor This the code I am using to illustarte > t[1] [1] 07/14/2009 13:41:00 10 Levels: 07/14/2009 13:41:00 07/14/2009 13:42:00 ... 07/15/2009 07:12:00 > a=t[1] > a [1] 07/14/2009 13:41:00 10 Levels: 07/14/2009 13:41:00 07/14/2009 13:42:00 ... 07/15/2009 07:12:00 > a=t[[1]] > a [1] 07/14/2009 13:41:00 10 Levels: 07/14/2009 13:41:00 07/14/2009 13:42:00 ... 07/15/2009 07:12:00 > as.character(a) [1] "07/14/2009 13:41:00" > z=strptime(a,"%m/%d/%y %H:%M") > z [1] NA > z=strptime("07/14/2009 13:41:00","%m/%d/%y %H:%M") > z [1] NA Why do I get NA? I am running R 2.8, openSUSE 11.0 Thanks Alon Ben-Ari [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Hosmer Lemshaw
Hello R experts, Is the a function to preform a Hosmer Lemshaw goodness of fit? I am running R 2.8. Thanks, AlonBen-Ari Department of Anesthesiology and CCM Univ. Pittsburgh [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Cannot install a package - with a funny error message
Hello I am trying to install the following package . I am logged in as SU of course. Below is my input and output. Any ideas? install.packages("kernlab") --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done Error in m[, 1] : incorrect number of dimensions Best, Alon [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] gfortran command not found?
Hello, I have openSUSE 11.1 Trying to install randomForest as SU after invoking R install.packages("randomForest") and I get this * Installing *source* package randomForest ... ** libs gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include-fpic -O2 -c classTree.c -o classTree.o gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include-fpic -O2 -c regTree.c -o regTree.o gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include-fpic -O2 -c regrf.c -o regrf.o gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include-fpic -O2 -c rf.c -o rf.o gfortran -fpic -O2 -c rfsub.f -o rfsub.o make: gfortran: Command not found make: *** [rfsub.o] Error 127 ERROR: compilation failed for package randomForest * Removing /usr/lib/R/library/randomForest The downloaded packages are in /tmp/RtmpLEyfgR/downloaded_packages Updating HTML index of packages in '.Library' Warning message: In install.packages("randomForest") : installation of package 'randomForest' had non-zero exit status > I checked that I have th fortran library S | Name | Summary | Type --+---+--+ i | libgfortran41 | The GNU Fortran Compiler Runtime Library | package i | libgfortran43 | The GNU Fortran Compiler Runtime Library | package Any ideas how to solve this impass? Alon Ben-Ari, MD Dept Of Anesthesiology. University of Pittsburgh [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] difficulty in Installing
Hello, I have openSUSE 11.1 Trying to install randomForest as SU after invoking R install.packages("randomForest") and I get this * Installing *source* package randomForest ... ** libs gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include-fpic -O2 -c classTree.c -o classTree.o gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include-fpic -O2 -c regTree.c -o regTree.o gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include-fpic -O2 -c regrf.c -o regrf.o gcc -std=gnu99 -I/usr/lib/R/include -I/usr/local/include-fpic -O2 -c rf.c -o rf.o gfortran -fpic -O2 -c rfsub.f -o rfsub.o make: gfortran: Command not found make: *** [rfsub.o] Error 127 ERROR: compilation failed for package randomForest * Removing /usr/lib/R/library/randomForest The downloaded packages are in /tmp/RtmpLEyfgR/downloaded_packages Updating HTML index of packages in '.Library' Warning message: In install.packages("randomForest") : installation of package 'randomForest' had non-zero exit status > I checked that I have th fortran library S | Name | Summary | Type --+---+--+ i | libgfortran41 | The GNU Fortran Compiler Runtime Library | package i | libgfortran43 | The GNU Fortran Compiler Runtime Library | package Any ideas how to solve this impass? Alon Ben-Ari, MD Dept Of Anesthesiology. University of Pittsburgh [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Want to post
Dont be so American Cut the paper work lets get going [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.