search for: syrvn

Displaying 20 results from an estimated 41 matches for "syrvn".

2011 Oct 13
8
Remove specific rows in a matrix/data.frame
...rs are also identical then I want to remove either the first or the second row of that letter. If for a letter the numbers are 1 and 0 I want to remove the row 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 mailing list archive at Nabble.com.
2011 Oct 06
3
Duplicate elements of a vector
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 the R help mailing list archive at Nabble.com.
2010 Sep 03
5
how to get row name of matrix when result is a vector
...3 b 5 34 5 2 4 > a[which(a[,3] < 6), ] [1] 5 34 5 2 4 I actually thought it must be rather easy to somehow extract the row name 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 the R help mailing list archive at Nabble.com.
2011 Oct 13
3
Create order of numbers based on a given vector
...FALSE) I can I create the following order of numbers based on vector vec: 1, 2, 2, 3, 3, 3, 4, 5 Whenever there is a FALSE I increase the number (starting with 1). Whenever there is a TRUE I set the same number 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.
2011 Aug 23
3
R system command does not work with objects/variables
...ain 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.789695.n4.nabble.com/R-system-command-does-not-work-with-objects-variables-tp3762544p3762544.html Sent from the R help mailing list archive at Nabble.com.
2012 Jul 08
3
list.files() find files beginning with a .
...RUE, all.files = TRUE) files /XXX/ZZZ/.R_history /XXX/ZZZ/AAA/Script.r /XXX/ZZZ/BBB/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-with-a-tp4635773.html Sent from the R help mailing list archive at Nabble.com.
2011 Nov 15
2
Extract pattern from string
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-tp4073432p4073432.html Sent from the R help mailing list archive at Nabble.com.
2011 Oct 04
1
texi2dvi problem when compiling incorrect Latex code
...or the process of texi2pdf / texi2dvi is not finished as the programme waits for user input (mostly just press "enter" key). The problem is that R outputs the output only after the whole programme 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.
2011 Nov 19
1
Eclipse StatET - create own code formatting
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-tp4086386p4086386.html Sent from the R help mailing list archive at Nabble.com.
2011 Nov 26
1
dir.create() does not create directory
...ory is not been created. The strange thing is that it happens only to some sub-folders... 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-tp4110517p4110517.html Sent from the R help mailing list archive at Nabble.com.
2010 Aug 10
2
p-values with pvclust
...s changing and not significant any longer (84). I was wondering why 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-with-pvclust-tp2319732p2319732.html Sent from the R help mailing list archive at Nabble.com.
2011 Sep 29
1
simplest pgfSweave example results in error
...here: http://www.text-upload.com/read.php?id=147997&c=7898288 test.tex I have no clue at all why it doesn't work. For sweating I use the Sweave.sty which 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 list archive at Nabble.com.
2010 Jan 29
2
Vectors with equal sd but different slope
...and x1 must have the same sd. y and y1 should also exhibit the same sd's but different ones as x and x1. Plotting x,y and x1,y1 should produce a plot with 2 vectors having a different slope. Plotting both vector pairs in one plot 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.
2011 Oct 16
3
Which function to use: grep, replace, substr etc.?
...what_is_your_surname_peter" I would like to apply predefined abbreviations for peter=p and name=n to both strings so that the new strings 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 list archive at Nabble.com.
2010 Nov 29
2
Significance of the difference between two correlation coefficients
...difference for z values is mathematically defined but I do not know how to incorporate the sample size. I found a couple of websites that provide that service but since I have huge data sets I need to automate this procedure. (http://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.
2011 Jul 13
7
Error when writing to Excel files using the packages xlsx and xlsx2
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 in ls(envir = envir, all.names = private) : invalid 'envir' argument We figured out that
2012 Mar 01
5
select rows by criteria
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 achieve is to select 7 rows (values) so that the mean value of those rows are closest to the value of 35
2010 Jun 28
2
How to run Bibtex with pdfLatex in StatEt/MikTex on Windows ?
Hello, I'm running R2.10, Eclipse, StatEt and MikTex 2.8 to create Sweave documents, and everything seems to work great, until today... I was trying to add citations from a Bibtex file, but I just got [?] citations. However, if I open the .tex file that StatEt created in MikTex and run the latex+bibtex+pdflatex command, the citations are present. Does anyone know how to either configure
2012 Feb 11
2
Detect numerical series
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 Cheers -- View this message in context:
2012 Feb 23
2
extract subset of data.frame
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: