Displaying 20 results from an estimated 76 matches for "mystrings".
Did you mean:
mystring
2009 Aug 21
2
Problem with passing a string to subset
Dear R-users,
The following question bothered me for the whole afternoon: how can one
pass a string as the conditioning argument to subset? I tried plain
mystr, eval(mystr), expression(mystr), etc... I don't to be able to find
the correct syntax
> foo <- data.frame(a=1:10,b=10:1,c=rep(1:2,5))
> mystr<-"c==1"
> subset(foo,c==1)
a b c
1 1 10 1
3 3 8 1
5 5 6
2009 Feb 12
3
getting all pairwise combinations of elements in a character string
I'm able to do this as follows, but am wondering if anyone knows a
simpler way which still avoids explicit loops?
> (mystring <- letters[1:5])
[1] "a" "b" "c" "d" "e"
> unlist(sapply(mystring[-length(mystring)],
+ function(x)
paste(x,mystring[(grep(x,mystring)+1):length(mystring)],sep="")))
a1 a2 a3
2007 May 28
2
[LLVMdev] Problem in llvm gcc back-end
HI,
While I testing some code, I found some problem on Union handling.
I've wrte following test code, and it has union assignment.
The code's output is
from pointerToUnion: chars mystring, length 64
from original: chars mystring, length 8000
It's caused by second char member(charlength) of LongestMember.
For union assignment, llvm-backend seems generates assigning each
member of
2019 Jan 25
0
[klibc:update-dash] mystring: fix "Illegal number" on FreeBSD & macOS for x=; echo $((x))
Commit-ID: 43f4d1915fc244522d3fabb0fd91d23994bd472e
Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=43f4d1915fc244522d3fabb0fd91d23994bd472e
Author: Martijn Dekker <martijn at inlv.org>
AuthorDate: Wed, 7 Mar 2018 13:03:26 +0000
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Fri, 25 Jan 2019 02:57:21 +0000
[klibc] mystring: fix "Illegal
2020 Mar 28
0
[klibc:update-dash] dash: mystring: fix "Illegal number" on FreeBSD & macOS for x=; echo $((x))
Commit-ID: 3f6667917c6cc2c90803e1a3e865f2c3b8b1bbf3
Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=3f6667917c6cc2c90803e1a3e865f2c3b8b1bbf3
Author: Martijn Dekker <martijn at inlv.org>
AuthorDate: Wed, 7 Mar 2018 13:03:26 +0000
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 28 Mar 2020 21:42:54 +0000
[klibc] dash: mystring: fix
2011 Feb 13
3
String manipulation
Please consider following string:
MyString <- "ABCFR34564IJVEOJC3434"
Here you see that, there are 4 groups in above string. 1st and 3rd groups
are for english letters and 2nd and 4th for numeric. Given a string, how can
I separate out those 4 groups?
Thanks for your time
[[alternative HTML version deleted]]
2007 Nov 20
3
How to test views with Nested Resources and Partials
Hi everyone,
I am relatively new to rspec and I am running into a wall in testing my
views. I have a RESTful resource Contracts with a nested resource of
Line_items.
I am trying to figure out how to test the "edit" form of the Line_items.
What complicates this is the nested routing and how to account for it,
and that there is a partial form (_form.haml) that both the edit.haml
and
2011 Sep 09
2
Comments inside a line? Not possible?
..."Comment your code. Entire commented lines should begin with # and one space.
Short comments can be placed after code preceded by two spaces, #, and
then one space. "
Just wondering if there is no way to comment something out "in the
middle" of a line? Example:
Original code:
mystrings<-c("a","b","c")
Desired commented code:
mystrings<-c("a", # want "b" to be commented out, but not "c" # "c")
So that it is read as: mystrings<-c("a","c")
Not possible?
Thanks!
--
Dimitri Liakhovit...
2008 Aug 31
1
Parenthesis recognition with grep
Dear R-users,
I need to dynamically recognize the index of a given string myStr in a
vector of string. The problem is that myStr might contain parenthesis,
causing grep not to recognize it the way I want (see below). The help
mentions that the pattern used by grep should be in the POSIX format...
I guess the problem is here; unfortunately, I am not familiar with the
subtleties of the POSIX
2010 Mar 26
6
Rake argument error
Hi,
I''m having a problem loading a sample data with simple rake command.
rake db:fixtures:load
When I run the above command,I get the following error
$rake db:fixtures:load
(in /home/raghu/www/photos)
rake aborted!
a YAML error occurred parsing
/home/raghu/www/photos/test/fixtures/photos.yml. Please note that YAML
must be consistently indented using spaces. Tabs are not allowed. Please
2011 Aug 04
3
#create tests fail when I add FriendlyId to my model
I am doing controller testing, and I can''t seem to get the create
method test to pass when friendly_id is added to the mix. If I comment
it out of the model, the tests all pass perfectly. The moment I add it
back in, the error looks like this:
1) Error:
test_create_valid(BrandsControllerTest):
FriendlyId::BlankError: FriendlyId::BlankError
2009 Sep 15
1
Regular expression problem
Dear R-users,
I am trying to use the grep function to test whether a particular string
is of the form "n.../mydir/myfile.mytype.myext". Anything between n and
mytype could vary, and anything after mytype could vary. I tried to
proceed by steps to build my regular expression... but I do not really
understand why the last call of the following code do not work.
Any help would be
2006 Aug 14
4
Test for string in string
Hi,
Is there an easy way to test if a substring exists in a string?
I''m using this check:
if mystring.index(substring) > 0
but it doesn''t seem to be working....
Thanks!
--
Posted via http://www.ruby-forum.com/.
2008 Aug 06
2
matching problem
I have a matching problem that I cant solve.
mystring = "xxx{XX}yy{YYY}zzz{Z}" where "x","X","y","Y","z","Z" basiclly can
be anything, letters, digits etc. I'm only interested in the content within
each "{}".
I am close but not really there yet.
library(gsubfn)
strapply(mystring,"\\{[^\\}]+",, perl=F)
2011 Oct 05
1
Weird behaviour of tab characters in a string in R (vs Python)
Hello,
I wanted to parse some information from a text, where fields are tab
separated.
When I copy the text into an R session (under emacs) like:
mystring <- "field1 field2 field3"
the tab character is replaced by a single space!
For ex, if I type mystring, I get:
"field1 field2 field3"
The tabs have disappeared!!!
I checked with Python that the text I copied was tab
2007 May 11
1
Cannot use an escape character in regexp
Given the string
> mystr <- "(Preconsuntivo del giorno gas 10 maggio
2007)Tj"
I'm trying to detect and eliminate the string ")Tj" at the
very end of mystr by means of
gsub(rx2,"",mystr) BUT preparing the
matching regexp string a warning pops up
> rx2 <- "\)Tj$"
Warning
messages:
1: '\)' is an unrecognized escape in a
2012 Jan 04
1
Warning message about closing a connection XXXX
Hello everyone,
After running the following code, I obtain this error message.
> mydata <- read.table(textConnection(mystring),
+ header=TRUE, sep=",",
+ row.names="id", na.strings=" ")
> mydata
Warning message:
closing unused connection 3 (mystring)
=====
However, when I attempt to run read.table() again and immediately submit
the close() function
2006 Jul 06
6
Class variables in templates/layouts
I''m having problems with class variables.. I have a class:
class Content::ApplicantsController < ApplicationController
layout "mylayout"
@@tab = "mystring"
[... the rest is standard scaffold-created stuff ...]
and a layout (mylayout.rhtml):
[...]
<title><%= @@tab.capitalize %></title>
[...]
And I keep getting this error:
uninitialized
2008 Oct 20
0
CGI and NET::SSH in the same script problems
I''m perplexed as to why I can run the following just fine from a command
line, but when I try to execute from a web browser it crashes.
From the command line it prints out...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"><HTML><BODY><H3>FlyBOB Control
Panel</H3><P>cmd=>[echo
2010 Dec 06
10
testing chapter: agile web dev withrails
I am working my way through Agile web development with rails and I''m in
the testing chapter.
when I run the following test(or any other test)
I''m new and not sure where to start looking.
require ''test_helper''
class ProductTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
I