Displaying 20 results from an estimated 76 matches for "ghi".
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 vec...
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 advance for an answer
Thomas
2025 Feb 05
2
Looking for simple line-splitting code
...l 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" "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 using `writeLines(x,...
2010 Jul 14
1
Arrange values on a timeline
...sociated 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 <- data.frame(timestamp=c(3,5,8), mylabel=c("abc","def","ghi"))
b <- data.frame(timestamp=c(1:10))
I would like to assign these labels as an extra collumn 'label' to the
data.frame b which currently only consists of a the timestamp. The
output would then look like this:
timestamp label
1 1 NA
2 2...
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:
>
> which is what I'd expect: the last line in the editor is empty.If I
> use `re...
2005 May 30
4
Very simple traffic shaping script for H.323
...#39;ll go thru my Firewall at Warp 9.9 regardless of
other traffic from other users.
Assumptions:
(1) I don''t care about slowing down other traffic flows. H.323 packets
should be serviced first no matter what.
(2) Any traffic with source or destination public IP Address
"abc.def.ghi.jkl" or private IP Address 192.168.16.4 is to/from from the
videoconference device.
After all the reading and studying, is it really this simple? Does
anyone have ideas on how to test this? How do I watch packets to see
which packets go into what PFIFO band?
#!/bin/sh
VTC1_PRIVATE="...
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 using `writeLines(x, "test.txt")`, my text edit...
2025 Feb 05
1
Looking for simple line-splitting code
...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" "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 usi...
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 th...
2013 Mar 21
0
Problems parsing page encoded in Shift-JIS
...age encoded with Shift-JIS. I have an HTML construct like:
<head>
<meta http-equiv="content-type" content="text/html; charset=Shift_JIS">
</head>
<body>
...
<ul id="test">
<li><a>abc</a><a>def</a><a>ghi</a><span>123</span></li>
<li><a>abc</a><a>def</a><a>ghi</a><span>123</span></li>
<li><a>abc</a><a>def</a><a>ghi</a><span>123</span></li>
</ul>
....
2010 Jul 14
2
Merging columns along time line
...sociated 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 <- data.frame(timestamp=c(3,5,8), mylabel=c("abc","def","ghi"))
b <- data.frame(timestamp=c(1:10))
I would like to assign these labels as an extra collumn 'label' to the
data.frame b which currently only consists of a the timestamp. The
output would then look like this:
timestamp label
1 1 NA
2 2...
2014 Feb 03
1
[PATCH] hivex: python: value_value no longer generates Unicode strings
...ot;: 3, "value": "ABC" },
{ "key": "Key2", "t": 3, "value": "DEF" }
]
-h.node_set_values (b, values)
+h.node_set_values (B, values)
value1 = { "key": "Key3", "t": 3, "value": "GHI" }
-h.node_set_value (b, value1)
+h.node_set_value (B, value1)
value1 = { "key": "Key1", "t": 3, "value": "JKL" }
-h.node_set_value (b, value1)
+h.node_set_value (B, value1)
-val = h.node_get_value (b, "Key1")
+val = h.node_get_v...
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 plot:
tmp <- aggregate(test$abc, list(
test$bins, test$groups),
mean)
colnames(tmp) <- c("bins", "groups", "abc")
tmp
#pltName <- paste("line_da...
2008 Aug 13
3
Search for (any of) multiple terms slow
..."abc") BODY "def")
85 select "Archive.2004.2005.2006.2007.2008"
86 UID fetch 1:* (FLAGS)
87 uid SEARCH UNDELETED (OR (OR BODY "xyz" BODY "abc") BODY "def")
88 IDLE
Searching for "xyz", "abc", "def" and "ghi" in Archive and subfolders
217 secs
89 select "Archive"
90 uid SEARCH UNDELETED (OR (OR (OR BODY "xyz" BODY "abc") BODY "def") BODY "ghi")
91 select "Archive.2004"
92 UID fetch 1:* (FLAGS)
93 uid SEARCH UNDELETED (OR (OR (OR BODY &qu...
2017 Jun 06
2
Plot MArginal distribution in the correct place
Hi all,
I have this code, but the marginal distribution plot doesn?t appear aligned
with the left plot.
I think could be something about layout or par() mar.
The code was programmed by me time ago.
Can anyone help me to get the marginal distribution on the center (more
higher centered)
id.txt
Could have this code:
05/01/2016;9335,200195
06/01/2016;9197,400391
07/01/2016;9059,299805
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 <- length(chr.pos)
chr.count
[1] 3
I'd like to append a column, say cnt, that has the count of "/" for e...
2009 Aug 11
1
re placePatterns() for multiple words replacement in tm
...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")
> replacePatterns(sample[[1]],change," Yes ")
[1] Yes def ghi
Thank you so much!!!!
--
View this message in context: http://www.nabble.com/replacePatterns%28%29-for-multiple-words-replacement-in-tm-tp24921281p24921281.html
Sent fr...
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: http://www.nabble.com/break-up-a-string-into-strings-with-a-fixed-length-tp25712955p25712955.html
Sent from the R help mailing list archive...