search for: ghy

Displaying 20 results from an estimated 76 matches for "ghy".

Did you mean: ghc
2011 Jan 10
2
Calculating Portfolio Standard deviation
Dear R helpers I have following data stocks <- c("ABC", "DEF", "GHI", "JKL") prices_df <- data.frame(ABC = c(17,24,15,22,16,22,17,22,15,19),                                          DEF = c(22,28,20,20,28,26,29,18,24,21),                                           GHI = c(32,27,32,36,37,37,34,23,25,32),                                          
2011 Oct 18
1
Function to "lump" factors together?
Sorry about the odd terminology, but I suspect that my intent might be completely missed had I used "aggregate" or "classify" (each of which appears to have some rather special meanings in statistical analysis and modeling). I have some data about software builds; one of the characteristics of each is the name of the branch. A colleague has generated some fairly interesting
2025 Feb 05
4
Looking for simple line-splitting code
If I have this object: x <- c("abc\ndef", "", "ghi") and I write it to a file using `writeLines(x, "test.txt")`, my text editor sees a 5 line file: 1: abc 2: def 3: 4: ghi 5: which is what I'd expect: the last line in the editor is empty. If I use `readLines("test.txt")` on that file, I get the vector
2006 Oct 27
3
Suppress blanks/spaces in character
Hi all I'm have a character vector and would like to suppress the blanks if there are more than one after the other. Example: Character value is: "abc def ghi" The result should be: "abc def ghi" I know that it's possible to delete the leading blanks with the command "trim". But how can I delete blanks within a character? Thank you very much in
2025 Feb 05
2
Looking for simple line-splitting code
Thanks to Rui, Peter and Tanvir! Peter's seems to be the fastest of the 3 suggestions so far on the little test case, but on the real data (where x contains several thousand lines), Rui's seems best. Duncan On 2025-02-05 9:13 a.m., peter dalgaard wrote: > This also seems to work: > >> strsplit(paste(x,collapse="\n"),"\n")[[1]] > [1] "abc"
2010 Jul 14
1
Arrange values on a timeline
I have a set of labels arranged along a timeframe in a. Each label has a timestamp and marks a state until the next label. The dataframe a contains 5 such timestamps and 5 associated labels. This means, on a continious scale between 1-100, there are 5 markers. E.g. 'abc' marks the timestampls between 10 and 19, 'def' marks the timestamps between 20 and 32, and so on. a <-
2025 Feb 05
1
Looking for simple line-splitting code
On Wed, 5 Feb 2025 08:44:12 -0500 Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > If I have this object: > > x <- c("abc\ndef", "", "ghi") > > and I write it to a file using `writeLines(x, "test.txt")`, my text > editor sees a 5 line file: > > 1: abc > 2: def > 3: > 4: ghi > 5: >
2005 May 30
4
Very simple traffic shaping script for H.323
Hello - What I want to do seems very simple - I want to make sure any H.323 traffic gets processed before anything else entering or leaving this network. The network has a videoconferencing device on the LAN at 192.168.16.4. A Linux firewall NATs an external IP Address to this internal address and I have appropriate SNAT and DNAT rules that work. The NAT and connection tracking rules all work
2025 Feb 05
1
Looking for simple line-splitting code
This also seems to work: > strsplit(paste(x,collapse="\n"),"\n")[[1]] [1] "abc" "def" "" "ghi" > On 5 Feb 2025, at 14:44 , Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > If I have this object: > > x <- c("abc\ndef", "", "ghi") > > and I write it to a file
2025 Feb 05
1
Looking for simple line-splitting code
A 3rd option could be scan(text=x, what="", blank.lines.skip=FALSE) (all because readLines() doesn't obey the text=x convention, perhaps it should? I'm unsure whether the textConnection is left open in Rui's method.) -pd > On 5 Feb 2025, at 15:35 , Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > Thanks to Rui, Peter and Tanvir! Peter's seems
2012 Aug 27
4
?nchar ?strsplit
Hi, my data frame is x<-data.frame(ID=c("abc/def","abc/def/ghi","abc","mno/pqr/st/ab")) I want to split my column ID using "/" as the place to split. How can I do that without telling the code how many sub-columns. I could use nchar(gsub("[^/]","",x$ID)) to get how many "/" are in each row of the column, but could
2013 Mar 21
0
Problems parsing page encoded in Shift-JIS
I''m posting this question to both mailing lists as I''m not sure whether it''s a Mechanize problem or a Nokogiri problem. Using Nokogiri and Mechanize to load and parse a web page encoded with Shift-JIS. I have an HTML construct like: <head> <meta http-equiv="content-type" content="text/html; charset=Shift_JIS"> </head> <body>
2010 Jul 14
2
Merging columns along time line
I am resending this, as I believe it has not arrived on the mailing list when I first emailed. I have a set of labels arranged along a timeframe in a. Each label has a timestamp and marks a state until the next label. The dataframe a contains 5 such timestamps and 5 associated labels. This means, on a continious scale between 1-100, there are 5 markers. E.g. 'abc' marks the timestampls
2014 Feb 03
1
[PATCH] hivex: python: value_value no longer generates Unicode strings
This fixes Github issue #2 reported by "kupiakos". <https://github.com/libguestfs/hivex/issues/2> --- generator/generator.ml | 2 +- python/t/210-setvalue.py | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/generator/generator.ml b/generator/generator.ml index 908c5f3..02aaf12 100755 --- a/generator/generator.ml +++
2005 Aug 15
3
How to repeat code snippet for several variables in a data frame?
Dear all, I have a data frame containing the results of an experiment. Like this: a<-seq(1,4,by=1) b<-seq(1,2,by=1) test<-expand.grid(b,a,a) colnames(test)<-c("replicates","bins", "groups") test$abc <- rnorm(32) test$def <- rnorm(32) test$ghi <- rnorm(32) test The following code snippet aggregates the data for one variable and then draws a
2008 Aug 13
3
Search for (any of) multiple terms slow
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, this may be an obvious logical problem I'm not aware of, which cannot be solved any more efficiently... but maybe it's just a bug or there is potential for optimisation in Dovecot (or Thunderbird?). When searching for multiple terms at once ("any of") with Thunderbird/Dovecot (using FTS Squat indexes), it takes much longer (not
2017 Jun 06
2
Plot MArginal distribution in the correct place
...469,299805 19/01/2016;8554,900391 20/01/2016;8281,400391 21/01/2016;8444,200195 22/01/2016;8722,900391 25/01/2016;8567,700195 26/01/2016;8692,5 27/01/2016;8741 g<-read.table("id.txt", col.names=c("Dateh","LAST"), sep=";", dec=",") N=5000 B=24 ghy<-nrow(g) r<-as.numeric(as.character(g$LAST[ghy])) nf<-layout(matrix(c(1,1,1,1,2,2),1,6,byrow=TRUE)) par(mar=c(6,6,6,0.5)) A<-matrix(1:B,B,N); sigma<-0.06; mu<-0.00; Z<-r*exp((mu-0.5*((sigma)^2)*A) +sigma*(sqrt(A))*matrix( rnorm(N*B,0,1), B, N)) real1<-g$LAST[1:n...
2011 Dec 01
2
Counting the occurences of a charater within a string
I am new to R but am experienced SAS user and I was hoping to get some help on counting the occurrences of a character within a string at a row level. My dataframe, x, is structured as below: Col1 abc/def ghi/jkl/mno I found this code on the board but it counts all occurrences of "/" in the dataframe. chr.pos <- which(unlist(strsplit(x,NULL))=='/') chr.count <-
2009 Aug 11
1
re placePatterns() for multiple words replacement in tm
Hi all, I wonder how you can replace all words that need to be changed using replacePatterns(). The following is my code. I want to replace both "abc" and "def" to " Yes ". However, I can only replace the first occurrence in sample[[1]]. > sample[[1]] [1] abc def ghi > change <- c("abc","def") >
2009 Oct 02
3
break up a string into strings with a fixed length
dear all, I have some very long strings and would like to break up each long string into multiple strings with a fixed length, e.g. to break up abcdefghijkl into abc, def, ghi, jkl I tried a couple of commands but was not successful. Any help will be appreciated. Best, Jimmy -- View this message in context: