[R] Significance of the difference between two correlation coefficients

2010-11-29 Thread syrvn
://faculty.vassar.edu/lowry/rdiff.html) Can anyone help? Cheers, syrvn -- View this message in context: http://r.789695.n4.nabble.com/Significance-of-the-difference-between-two-correlation-coefficients-tp3063765p3063765.html Sent from the R help mailing list archive at Nabble.com

Re: [R] Significance of the difference between two correlation coefficients

2010-11-29 Thread syrvn
Hi, thanks a lot. that's what i tried to figure out! it works great and is exactly what i need. Best, syrvn -- View this message in context: http://r.789695.n4.nabble.com/Significance-of-the-difference-between-two-correlation-coefficients-tp3063765p3063997.html Sent from the R help mailing

Re: [R] convert data.frame to matrix - NA factor problem

2010-07-14 Thread syrvn
Hi, I used str() on my data set: $ X1: num 1 1 0 1 1 1 1 1 1 1 ... $ X2: num 0 1 0 2 1 2 0 2 2 0 ... $ X3: Factor w/ 4 levels 0,1,2,NA: 2 1 3 1 1 1 1 1 1 3 ... The difference to your str() output is that in your case NA columns are num columns and in

Re: [R] convert data.frame to matrix - NA factor problem

2010-07-14 Thread syrvn
Thanks again for your quick reply. I understood your procedure but now it is even more strange why my conversion does not work. In your example, the NA values are in brackets NA and what your procedure does is to convert these NA values into NA and then it seems to be possible to use data.matrix

[R] p-values pvclust maximum distance measure

2010-07-20 Thread syrvn
) plot(b.res5) plot(b.res6) plot(b.res7) plot(b.res8) plot(b.res9) dev.off() -- Why is that??? Cheers syrvn http://r.789695.n4.nabble.com/file/n2295594/Res.pdf Res.pdf -- View this message in context: http://r.789695.n4.nabble.com/p

[R] p-values pvclust maximum distance measure

2010-07-20 Thread syrvn
) plot(b.res5) plot(b.res6) plot(b.res7) plot(b.res8) plot(b.res9) dev.off() -- Why is that??? Cheers syrvn http://r.789695.n4.nabble.com/file/n2295593/Res.pdf Res.pdf -- View this message in context: http://r.789695.n4.nabble.com/p

[R] Brute-force clustering

2010-07-21 Thread syrvn
Hi all, I use heatmap.2 for clustering and as you know you can choose between several distance functions and clustering algorithms. Trying all combinations isn't too bad but I have two further parameters and whenever I change one of these I need do redo all cluster combinations. It probably

[R] Clustering groups

2010-07-21 Thread syrvn
Hi, is there a way in R to identify those cluster methods / distance measures which best reflect predefined cluster groups. Given 10 observations O1...O10. Optimally, these 10 observations cluster as follows: cluster1: O1, O2, O3, O4 cluster2: O5, O6 cluster3: O7, O8, O9, O10. What I want is a

[R] specify heat.colors

2010-07-23 Thread syrvn
Hi, I use heatmap.2 and heat.colors. Is it possible to specify the colors in that way that all values below, for instance, 1.5 should be coloured red, values between 1.5 and 1.7 green and above 1.7 black? Many thanks -- View this message in context:

[R] p-values with pvclust

2010-08-10 Thread syrvn
this happens because I thought that for each brunch the p-value is calculated independently? Does anybody know how to get a correct p-value for the first brunch (7 and 8) maybe without adding an additional brunch? Best regards syrvn -- View this message in context: http://r.789695.n4.nabble.com/p-values

[R] p-values with pvclust

2010-08-10 Thread syrvn
is calculated independently? Does anybody know how to get a correct p-value for the first brunch (7 and 8) maybe without adding an additional brunch? Best regards syrvn -- View this message in context: http://r.789695.n4.nabble.com/p-values-with-pvclust-tp2319739p2319739.html Sent from the R help

[R] how to get row name of matrix when result is a vector

2010-09-03 Thread syrvn
when the result is just a vector as in the second example and not a matrix. I tried several ways but without any success. Any advice? Best, syrvn -- View this message in context: http://r.789695.n4.nabble.com/how-to-get-row-name-of-matrix-when-result-is-a-vector-tp2525631p2525631.html Sent from

Re: [R] how to get row name of matrix when result is a vector

2010-09-03 Thread syrvn
Hi, I do not understand the code right now but it does its job. Thanks a lot! Best, syrvn -- View this message in context: http://r.789695.n4.nabble.com/how-to-get-row-name-of-matrix-when-result-is-a-vector-tp2525631p2525657.html Sent from the R help mailing list archive at Nabble.com

[R] Problems extracting p-value from summary(aov(...))

2010-09-29 Thread syrvn
Hi, I did a aov and used summary to obtain the p-value. I tried many ways to extract the p-value from the summary result but failed. Among others I tried the following: test.summary - summary(aov(data[,1]~time.points+Error(subject/time.points))) test.summary Error: subject Df

[R] R example for ancova

2009-12-05 Thread syrvn
Hi list, does anybody know a easy to understand example in R which shows how to perfom an ANCOVA? I already tried to understand the example which you get when you type ?aov, but I did not really understand the output. Best, syrvn -- View this message in context: http://n4.nabble.com/R

[R] Vectors with equal sd but different slope

2010-01-29 Thread syrvn
with fixed axes should reveal the different slope. many thanks syrvn -- View this message in context: http://n4.nabble.com/Vectors-with-equal-sd-but-different-slope-tp1415562p1415562.html Sent from the R help mailing list archive at Nabble.com. __ R-help

[R] Problems installing stats (prcomp) package

2010-02-09 Thread syrvn
Hi, since nearly 2 hours I try to install the stats package which includes the prcomp package for principal component analysis. I can not find the stats package via the R paket-repository. I found the following url (http://finzi.psych.upenn.edu/R/library/stats/) which includes 2 files: stats.rdb

[R] Error when writing to Excel files using the packages xlsx and xlsx2

2011-07-13 Thread syrvn
Dear group, I am working on a rather big project where the output data frames have dimensions of 3000 x 15 or greater. We are using xlsx and xlsx2 to write the data.frames to Excel sheets. Since recently we get the following error, when trying to write the data frames to the excel sheets: Error

Re: [R] Error when writing to Excel files using the packages xlsx and xlsx2

2011-07-13 Thread syrvn
Hi Denis, are you saying that we should write the R output (data frame) to a .csv file and then import it manually into Excel? Thanks Flo -- View this message in context: http://r.789695.n4.nabble.com/Error-when-writing-to-Excel-files-using-the-packages-xlsx-and-xlsx2-tp3664617p3664639.html

Re: [R] Error when writing to Excel files using the packages xlsx and xlsx2

2011-07-13 Thread syrvn
Hi, thanks for this web page! We decided to go for XLConnect because it can read and write xlsx sheets. With that package we get the same error message (see above) as with the xlsx package. After that error we even end up with a corrupted excel spread sheet. We are not able to open it any

[R] R system command does not work with objects/variables

2011-08-23 Thread syrvn
in a variable/object and call the perl script again it does not run and I don't know how to overcome that issue. p1 - ../path1 p2 - ../path2 p3 - ../path3 system(perl p1 p2 p3) I also tried: system(perl 'p1' 'p2' 'p3') Can anyone help? Best, syrvn -- View this message in context: http://r

Re: [R] R system command does not work with objects/variables

2011-08-23 Thread syrvn
Hi, it works great with the paste command! thanks a lot! Best, syrvn -- View this message in context: http://r.789695.n4.nabble.com/R-system-command-does-not-work-with-objects-variables-tp3762544p3762583.html Sent from the R help mailing list archive at Nabble.com

[R] simplest pgfSweave example results in error

2011-09-29 Thread syrvn
comes with R. Do I have to use a different file for pgfSweave? Help is very much appreciated as I totally run out of ideas... Best, syrvn -- View this message in context: http://r.789695.n4.nabble.com/simplest-pgfSweave-example-results-in-error-tp3856628p3856628.html Sent from the R help mailing

Re: [R] simplest pgfSweave example results in error

2011-09-29 Thread syrvn
. If I include or exclude \usepackage{tikz} does not make a difference. I get the same error message. Best regards, syrvn -- View this message in context: http://r.789695.n4.nabble.com/simplest-pgfSweave-example-results-in-error-tp3856628p3858091.html Sent from the R help mailing list archive

Re: [R] simplest pgfSweave example results in error

2011-09-30 Thread syrvn
files produced by pgfSweave as well as pdflatex here: http://elxsi.de/~wolfgang/ Hope that helps to track down the cause of the failure... Syrvn -- View this message in context: http://r.789695.n4.nabble.com/simplest-pgfSweave-example-results-in-error-tp3856628p3859148.html Sent from the R help

[R] Understanding the workflow between sweave, R and Latex

2011-09-30 Thread syrvn
/Library/Frameworks/R.framework/Resources/share/texmf Sweave to ln -s /Library/Frameworks/R.framework/Resources/share/texmf Sweave_Link In the .Rnw file do I have to use then \usepackage{Sweave_Link}? Best regards, syrvn -- View this message in context: http://r.789695.n4.nabble.com/Understanding

Re: [R] Understanding the workflow between sweave, R and Latex

2011-09-30 Thread syrvn
Hi Duncan, I use Eclipse and StatET plus TexClipse and Sweave which comes with the StatET package. So fore me it is basically one click as well to produce the pdf from the .Rnw file. I installed the MacTex live 2011 version on my computer and thought it might actually be easy to find out how and

[R] Create web applications to run R scripts

2011-10-01 Thread syrvn
Hello, is there anything similar to the Rwui package to create web applications to run R scripts? Many thanks, syrvn -- View this message in context: http://r.789695.n4.nabble.com/Create-web-applications-to-run-R-scripts-tp3863457p3863457.html Sent from the R help mailing list archive

Re: [R] How to run Bibtex with pdfLatex in StatEt/MikTex on Windows ?

2011-10-03 Thread syrvn
Hello, I have exactly the same problem that bibtex is not being called and so the bibliography is not being processed... Did you find any solution for that? Many thanks syrvn -- View this message in context: http://r.789695.n4.nabble.com/How-to-run-Bibtex-with-pdfLatex-in-StatEt-MikTex

Re: [R] How to run Bibtex with pdfLatex in StatEt/MikTex on Windows ?

2011-10-03 Thread syrvn
Hi Duncan, you were right. texi2dvi does latex + bibtex. Unfortunately I cannot get it running. When I run texi2dvi(file = path/to/tex/file, pdf=TRUE, quiet=FALSE) then I get the following error message: ___ Error in

Re: [R] How to run Bibtex with pdfLatex in StatEt/MikTex on Windows ?

2011-10-03 Thread syrvn
I am a bit confused... I wrote a little shell script called tex2pdf which just calls: texi2pdf body.tex and when I execute it in a terminal it runs smoothly. If I type into R: system(/Path/to/tex2pdf) I get the same error message: You don't have a working TeX binary (tex) installed anywhere in

Re: [R] How to run Bibtex with pdfLatex in StatEt/MikTex on Windows ?

2011-10-03 Thread syrvn
Hi, I know now why it did not work. See here: http://www.mail-archive.com/r-help@r-project.org/msg19682.html I started R via the terminal with open -a R and then called the script again as well as the texi2dvi function. Both worked. The problem now is I use R within Eclipse and I don't know how

[R] texi2dvi problem when compiling incorrect Latex code

2011-10-04 Thread syrvn
finished so I always end up having to kill my R console. Is there any workaround for that? Syrvn -- View this message in context: http://r.789695.n4.nabble.com/texi2dvi-problem-when-compiling-incorrect-Latex-code-tp3870827p3870827.html Sent from the R help mailing list archive at Nabble.com

Re: [R] texi2dvi problem when compiling incorrect Latex code

2011-10-05 Thread syrvn
. The only problem is that if I do it in R the console does not print everything until the question mark and therefore I cannot just press enter to let latex finish compiling the code. I don't know how to get around this. Best syrvn -- View this message in context: http://r.789695.n4.nabble.com

Re: [R] texi2dvi problem when compiling incorrect Latex code

2011-10-05 Thread syrvn
. This was possible by adding the -halt-on-error parameter. Thanks for your support anyway. Best, Syrvn -- View this message in context: http://r.789695.n4.nabble.com/texi2dvi-problem-when-compiling-incorrect-Latex-code-tp3870827p3874594.html Sent from the R help mailing list archive at Nabble.com

[R] Duplicate elements of a vector

2011-10-06 Thread syrvn
Hi, let's assume I have the following vector a: 1 5 23 How can I use R to duplicate the elements so that my new vector looks like: 1 1 5 5 23 23 Many thanks, Syrvn -- View this message in context: http://r.789695.n4.nabble.com/Duplicate-elements-of-a-vector-tp3879561p3879561.html Sent from

Re: [R] Duplicate elements of a vector

2011-10-06 Thread syrvn
thanks guys! I also found this solution but I think yours is better. as.vector(rbind(c(1, 5, 23))) Cheers syrvn -- View this message in context: http://r.789695.n4.nabble.com/Duplicate-elements-of-a-vector-tp3879561p3879907.html Sent from the R help mailing list archive at Nabble.com

Re: [R] Delete files with system command on Windows 7

2011-10-08 Thread syrvn
Under MacOS I use the following script to process my latex documents: pdflatex -halt-on-error document.tex bibtex document.aux pdflatex -halt-on-error document.tex pdflatex -halt-on-error document.tex rm *.aux *.bbl *.blg *.log *.nlo *.thm How can I realise this under Windows 7? -- View this

Re: [R] Delete files with system command on Windows 7

2011-10-08 Thread syrvn
It's all in the context of calling commands via the system command in R. I just found out that you can run system(pdflatex file) and it works fine. So R finds the command pdflatex but not the del command which I can use to delete files. I am wondering how I have to call this command to be able

[R] Create order of numbers based on a given vector

2011-10-13 Thread syrvn
as the previous FALSE has been assigned to. I would be happy for any input Cheers, Syrvn -- View this message in context: http://r.789695.n4.nabble.com/Create-order-of-numbers-based-on-a-given-vector-tp3901158p3901158.html Sent from the R help mailing list archive at Nabble.com

Re: [R] Create order of numbers based on a given vector

2011-10-13 Thread syrvn
Hi, thanks for all of your answers! Great solutions for my problem :) Best, syrvn -- View this message in context: http://r.789695.n4.nabble.com/Create-order-of-numbers-based-on-a-given-vector-tp3901158p3901292.html Sent from the R help mailing list archive at Nabble.com

[R] Remove specific rows in a matrix/data.frame

2011-10-13 Thread syrvn
with the 0. That means if the code works I would and up with the following matrix/data.frame Letter Number a 1 b 1 c 1 d 1 Many thanks, Syrvn -- View this message in context: http://r.789695.n4.nabble.com/Remove-specific-rows-in-a-matrix-data-frame-tp3902149p3902149.html Sent from the R help

Re: [R] Remove specific rows in a matrix/data.frame

2011-10-13 Thread syrvn
Thanks for your answers! Will check them now :) Yes, sorry, I was wrong. Letter Number d 0 d 0 should be: Letter Number d 0 after applying the algorithm! -- View this message in context: http://r.789695.n4.nabble.com/Remove-specific-rows-in-a-matrix-data-frame-tp3902149p3902216.html Sent

Re: [R] Remove specific rows in a matrix/data.frame

2011-10-13 Thread syrvn
Hello again, dtf-read.table(textConnection(Letter Test Number a b 1 a b 1 b b 1

[R] Which function to use: grep, replace, substr etc.?

2011-10-16 Thread syrvn
look like the followings: str1: My_n_is_p str2: what_is_your_surn_p Which method is the best to use for that particular problem? syrvn -- View this message in context: http://r.789695.n4.nabble.com/Which-function-to-use-grep-replace-substr-etc-tp3909871p3909871.html Sent from the R help mailing

Re: [R] Which function to use: grep, replace, substr etc.?

2011-10-16 Thread syrvn
Hi, thanks for the tip! I do it as follows now but I still have a problem I do not understand: abbrvs - data.frame(c(peter, name, male, female), c(P, N, m, f)) colnames(abbrvs) - c(pattern, replacement) str

[R] extract subset of data.frame

2012-02-23 Thread syrvn
Hello, consider the following data.frame df and vector v df - data.frame(group = c(A,B,C,D), value = c(1,2,3,4)) v - c(2,3) How can I return a sub data.frame which has only the rows left where value matches v df: group value B 2 C 3 Cheers -- View this message in context:

[R] gsub to manipulate characters

2012-02-24 Thread syrvn
Hello, from a vector of strings I want to delete everything after the _ v - c(AAA_BB, FF_MM) gsub(_*, , v) [1] AAABB FFMM but should be [1] AAA FF Why does * not work? Even perl=TRUE does not give me the right result Man thanks! -- View this message in context:

Re: [R] gsub to manipulate characters

2012-02-24 Thread syrvn
cool that works! thanks a lot :) -- View this message in context: http://r.789695.n4.nabble.com/gsub-to-manipulate-characters-tp4416939p4416961.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] select rows by criteria

2012-03-01 Thread syrvn
Hello, I am stuck with selecting the right rows from a data frame. I think the problem is rather how to select them then how to implement the R code. Consider the following data frame: df - data.frame(ID = c(1,2,3,4,5,6,7,8,9,10), value = c(34,12,23,25,34,42,48,29,30,27)) What I want to

[R] Add number series to data frame

2012-03-06 Thread syrvn
Hi, Is there a simple way of doing the following in R? a - data.frame(name = c(rep(A, 3), rep(B, 5), rep(C, 10))) a name 1 A 2 A 3 A 4 B 5 B 6 B 7 B 8 B 9 C 10C 11C 12C 13C 14C 15C 16C 17C 18C Do some fancy R code

Re: [R] Add number series to data frame

2012-03-06 Thread syrvn
Hi Sarah, thanks a lot for this peace of code. Is it possible to give the second sequence of B in your second example (data frame b) the numbers 6, 7 and 8 instead of 1, 2 and 3 again? In my real data I have more columns than only those two and sometimes the are sorted differently so that

Re: [R] Add number series to data frame

2012-03-07 Thread syrvn
Hi Petr, that works great. thanks! I was working my head off on that :) -- View this message in context: http://r.789695.n4.nabble.com/Add-number-series-to-data-frame-tp4450495p4452962.html Sent from the R help mailing list archive at Nabble.com. __

[R] StatET: Commands are not submitted to the console

2011-11-02 Thread syrvn
and knows how to fix that. Googling does not result in any useful pages I am running Mac OS X Lion + Newest version of Eclipse and StatET. Everything is up to date. Cheers, syrvn -- View this message in context: http://r.789695.n4.nabble.com/StatET-Commands-are-not-submitted

[R] Question regarding Kruskal-Wallis test

2011-11-15 Thread syrvn
. Treated group 1 Control group vs. Treated group 2 Treated group 1 vs. Treated group 2 I am not sure about whether the last comparison is made by the test or not? What happens if I have 4 different groups? Are there then all possible combinations compared? Cheers, Syrvn -- View this message

[R] Extract pattern from string

2011-11-15 Thread syrvn
Hello, with Sys.time() you get the following string: 2011-11-15 16:25:55 GMT How can I extract the following substrings: year - 2011 month - 11 day_time - 15_16_25_55 Cheers, Syrvn -- View this message in context: http://r.789695.n4.nabble.com/Extract-pattern-from-string

Re: [R] Extract pattern from string

2011-11-15 Thread syrvn
Wow, that is a very clever way to do it. Thank you very much! Cheers, Syrvn -- View this message in context: http://r.789695.n4.nabble.com/Extract-pattern-from-string-tp4073432p4074023.html Sent from the R help mailing list archive at Nabble.com

[R] Eclipse StatET - create own code formatting

2011-11-19 Thread syrvn
Hello, does anybody know whether it is possible to create its own code formatting rules? Defining rules under Eclipse - Preferences - R Code Formatting is so limited. Cheers, Syrvn -- View this message in context: http://r.789695.n4.nabble.com/Eclipse-StatET-create-own-code-formatting

[R] fixed-effect or random-effect ANOVA model

2011-11-23 Thread syrvn
the effect size between sub-group A, B, C and D is approx. the same. Does this analysis make sense or how would you analyse this kind of data? Is there an R package which can easily deal with such situations? Cheers, syrvn -- View this message in context: http://r.789695.n4.nabble.com/fixed-effect

[R] R package for nested random-effects ANOVA models

2011-11-24 Thread syrvn
Hello, can anyone recommend an R package which can deal with nested random-effects ANOVA models? Cheers Syrvn -- View this message in context: http://r.789695.n4.nabble.com/R-package-for-nested-random-effects-ANOVA-models-tp4104374p4104374.html Sent from the R help mailing list archive

[R] Confidence and variance plots

2011-11-25 Thread syrvn
://www.ehjournal.net/content/pdf/1476-069x-9-31.pdf Does anybody know how to produce such plots in R? Are there any package which can plot such graphics or do I have to construct these by myself, somehow? Cheers, Syrvn -- View this message in context: http://r.789695.n4.nabble.com/Confidence

[R] dir.create() does not create directory

2011-11-26 Thread syrvn
... On the other hand when I use the normal windows explorer in one of these sub-folders and create a folder it works. Any ideas? I also tried the mode=777 option but still the same problem Cheers, syrvn -- View this message in context: http://r.789695.n4.nabble.com/dir-create-does-not-create-directory

[R] Fitting a linear model with lmer in the lme4 package

2011-11-28 Thread syrvn
://www.pic-upload.de/view-12130948/data.png.html I am not sure of how to fit my model now. Would it be as simple as only adding the third factor? lmer(Protein_1 ~ 1 + (1|Group) + (1|Sub_Disease) + (1|Disease)) ? Cheers, Syrvn -- View this message

[R] quick ANOVA question

2011-11-29 Thread syrvn
Hello, imagine the following experimental design: Group - Value control - 5 control - 6 control - 5 treated1 - 8 treated1 - 9 treated1 - 9 treated2 - 15 treated2 - 16 treated2 - 15 treated3 - 25 treated3 - 30 treated3 - 28 What I like to know is if I apply an ANOVA to this data and choose

[R] Help needed in reproducing a plot

2011-11-29 Thread syrvn
Hello, can anybody tell me how to produce a plot like the one in http://cran.r-project.org/web/packages/lme4/vignettes/Implementation.pdf on page 13, Figure 6? The data is stored in: library(nlme) data(Oats) Cheers -- View this message in context:

[R] Data alignment

2011-12-03 Thread syrvn
Hello! I have a data.frame which looks like: Name - Value A - 400 A - 300 B - 200 B - 350 C - 500 C - 350 D - 450 D - 600 E - 700 E - 750 F - 630 F - 650 I want to add another column where all A,B should get an index 1, all C,D an index of 2 and all E,F an index of 3 so that the data.frame

Re: [R] Data alignment

2011-12-03 Thread syrvn
Thanks for your suggestions. I will try them. The - in my original post was actually only there to serve as a separator so that it is easier for you to see the data structure but apparently it rather confused you... sorry :) -- View this message in context:

[R] replace values

2011-12-03 Thread syrvn
to achieve this? Cheers, Syrvn -- View this message in context: http://r.789695.n4.nabble.com/replace-values-tp4153301p4153301.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] xyplot squeezed together

2011-12-04 Thread syrvn
Hi, I created the following example of a xyplot. The plot actually looks ok apart from that the x-axis is pretty squeezed/clinched. I tried aspect=fill already but I want to have all 3 sub plots next to each other. I tried loads of different scaling varieties but with no significant result...

[R] 2 sample wilcox.test != kruskal.test

2012-01-10 Thread syrvn
Hello, I think I am right in saying that a 2 sample wilcox.test is equal to a 2 sample kruskal.test and a 2 sample t.test is equal to a 2 sample anova. This is also stated in the ?kruskal.test man page: The Wilcoxon rank sum test (wilcox.test) as the special case for two samples; lm together

Re: [R] 2 sample wilcox.test != kruskal.test

2012-01-11 Thread syrvn
Hi, thanks for your answer. Unfortunately I cannot reproduce your results. In my example the results still differ when I use your approach: x - c(10,11,15,8,16,12,20) y - c(10,14,18,25,28,30,35) f - as.factor(c(rep(a,7), rep(b,7))) d - c(x,y) kruskal.test(x,y) Kruskal-Wallis rank

Re: [R] 2 sample wilcox.test != kruskal.test

2012-01-11 Thread syrvn
Hi Michael and Mi³ego dnia, yes right. I get identical results now! thanks a lot! -- View this message in context: http://r.789695.n4.nabble.com/2-sample-wilcox-test-kruskal-test-tp4282888p4285325.html Sent from the R help mailing list archive at Nabble.com.

[R] Detect numerical series

2012-02-11 Thread syrvn
Hello, I am struggling with detecting successive digits in a numerical series vector. Here is an example: vec - c(1, 15, 26, 29, 30, 31, 37, 40, 41) I want to be able to detect 29, 30, 31 and 40, 41. Then, I would like to delete the successive digits from the vector. 1, 15, 26, 29, 37, 40

Re: [R] Detect numerical series

2012-02-11 Thread syrvn
That's great code. Thanks a lot! -- View this message in context: http://r.789695.n4.nabble.com/Detect-numerical-series-tp4379088p4379133.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Derive pattern from vector

2012-02-11 Thread syrvn
Hello, consider the following vector 'chars': chars - c(A, B, C, C, D, E, E, E, F, F, F) I need to convert 'chars' into the following pattern: 1, 2, 3, 3, 4, 5, 5, 5, 6, 7, 8 As soon as there are duplicates they get the same number otherwise it's increasing numbers. However, for the char

Re: [R] Derive pattern from vector

2012-02-11 Thread syrvn
fantastic. Thanks for that chunk of code. Works great! :) -- View this message in context: http://r.789695.n4.nabble.com/Derive-pattern-from-vector-tp4379312p4379402.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] Vector manipulation

2012-02-12 Thread syrvn
Hello, I am stuck with the following problem. Consider the vector: vec - c(2,4,6,9,10) I now want to use R to manipulate the vector as follows: [1] 2, 4, 2, 6, 2, 9, 2, 10 In words, the first element of the vector should be placed in front of each following number. Which R commands do I

Re: [R] Vector manipulation

2012-02-12 Thread syrvn
Great Dimitris. It helps indeed! Thanks a lot! -- View this message in context: http://r.789695.n4.nabble.com/Vector-manipulation-tp4381586p4381614.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Deleting rows and columns containing NA's and only

2012-02-13 Thread syrvn
Hello, I use read.xls from the gdata package to read in xlsx files. Sometimes these data.frames contain NA columns and rows only. I know how to get rid of those ones but here is the R output of a test data set read in with read.xls t1 A B X D X.1

Re: [R] Deleting rows and columns containing NA's and only

2012-02-13 Thread syrvn
Hi, thanks for you suggestion. I finally solved it in a different way using apply and is.na for TRUE NA's and if(as.character(x) == NA) etc. However, I just spotted that read.xls seems to have problems reading in special characters such as or . Is there any workaround for that? -- View this

Re: [R] Deleting rows and columns containing NA's and only

2012-02-13 Thread syrvn
Hi David, I am using read.xls not read.table. -- View this message in context: http://r.789695.n4.nabble.com/Deleting-rows-and-columns-containing-NA-s-and-only-tp4384173p4384866.html Sent from the R help mailing list archive at Nabble.com. __

[R] Open windows explorer with specific path using system command

2012-06-14 Thread syrvn
that fails? Many thanks Syrvn -- View this message in context: http://r.789695.n4.nabble.com/Open-windows-explorer-with-specific-path-using-system-command-tp4633354.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] Quantitative analysis of treatment effects

2012-07-02 Thread syrvn
or a higher dose of the same drug. I also need to include 1 or 2 co-variates in the analysis. Unfortunately, I do not know if there is a statistical test/technique in R which I can use to answer this question. Any advise is very much appreciated. syrvn -- View this message in context: http://r

Re: [R] Quantitative analysis of treatment effects

2012-07-02 Thread syrvn
I found a nice presentation which I think addresses my question/problem. See slide 3 here: http://www.ispor.org/meetings/atlanta0510/presentations/IP1-CookJohnR.pdf -- View this message in context: http://r.789695.n4.nabble.com/Quantitative-analysis-of-treatment-effects-tp4635094p4635095.html

[R] Difference between two-way ANOVA and (two-way) ANCOVA

2012-07-04 Thread syrvn
Hi! as my subject says I am struggling with the different of a two-way ANOVA and a (two-way) ANCOVA. I found the following examples from this webpage: http://www.statmethods.net/stats/anova.html # One Way Anova (Completely Randomized Design) fit - aov(y ~ A, data=mydataframe) # Randomized

[R] list.files() find files beginning with a .

2012-07-08 Thread syrvn
/test.xlsx /XXX/ZZZ/CCC/.xyz files - files[grep(^.*$, files)] I want grep to return only the following to lines: /XXX/ZZZ/.R_history /XXX/ZZZ/CCC/.xyz Any ideas on how to solve that issue? Cheers syrvn -- View this message in context: http://r.789695.n4.nabble.com/list-files-find-files-beginning

[R] series of boxplots

2011-02-07 Thread syrvn
hi group, imagine the following data frame df: 1 2 3 4 ... A 5 1 .. A 4 3 .. A 3 4 .. B 7 9 .. B 8 1 .. B 6 8 .. I tried the following and some variations to plot this matrix as boxplots: boxplot(df[1:3,2]~df[1:3,1], xlim=c(1,10)) par(new=TRUE) boxplot(cpd12[4:6,2]~df[1:3,1], xlim=c(2,10))

[R] Test for equivalence

2011-02-12 Thread syrvn
Hi! is there a way in R to check whether the outcome of two different experiments is statistically distinguishable or indistinguishable? More preciously, I used the wilcoxon test to determine the differences between controls and treated subjects for two different experiments. Now I would like to

Re: [R] Test for equivalence

2011-02-14 Thread syrvn
Hi! first of all. Thank you all very much for your input. I am sorry but I haven't had yet the time to reply to all of your messages. I will give you a more detailed description of my problem within the next 2 days! Many thanks again. Best, syrvn -- View this message in context: http://r

[R] Output of system() not shown in if

2012-05-11 Thread syrvn
for that problem? Cheers syrvn -- View this message in context: http://r.789695.n4.nabble.com/Output-of-system-not-shown-in-if-tp4626383.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Output of system() not shown in if

2012-05-11 Thread syrvn
Ah I managed to do it by simple adding a print() statement around the system call... easy :) -- View this message in context: http://r.789695.n4.nabble.com/Output-of-system-not-shown-in-if-tp4626383p4626461.html Sent from the R help mailing list archive at Nabble.com.