Displaying 20 results from an estimated 76 matches for "mystring".
Did you mean:
mbstring
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 a4 b1 b2 b3 c1 c2 d
&...
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 largest union member. (I've checked it on llvm assembly
level..)
But sometimes there is padding...
2019 Jan 25
0
[klibc:update-dash] mystring: fix "Illegal number" on FreeBSD & macOS for x=; echo $((x))
.../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 number" on FreeBSD & macOS for x=; echo $((x))
Op 07-03-18 om 06:26 schreef Herbert Xu:
> Martijn Dekker <martijn at inlv.org> wrote:
>>
>>> Since base is always a constant 0 or a constant 10, never a
>>> user-provided value, the only er...
2020 Mar 28
0
[klibc:update-dash] dash: mystring: fix "Illegal number" on FreeBSD & macOS for x=; echo $((x))
...ernel.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 "Illegal number" on FreeBSD & macOS for x=; echo $((x))
[ dash commit 2b3fb53c6940471955631353b8bdb7d5a4677fd1 ]
Op 07-03-18 om 06:26 schreef Herbert Xu:
> Martijn Dekker <martijn at inlv.org> wrote:
>>
>>> Since base is always a constant 0 or a constant...
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
...####
require File.dirname(__FILE__) + ''/../../spec_helper''
describe "/line_items/edit.haml" do
include LineItemsHelper
before do
@contract = mock_model(Contract)
@contract.stub!(:id).and_return("1")
@contract.stub!(:sdc_ref).and_return("MyString")
@contract.stub!(:description).and_return("MyString")
@contract.stub!(:sales_rep_id).and_return("1")
@contract.stub!(:office_id).and_return("1")
@contract.stub!(:account_id).and_return("MyString")
@contract.stub!(:cust_po_num).and_re...
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 Liakhovi...
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
...w.yaml.org/faq.html
The exact error was:
ArgumentError: syntax error on line 14, col 11: ` filename:
train.jpg''
(See full trace by running task with --trace)
Here is the file that can be useful
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
filename: MyString
thumbnail: MyString
description: MyString
two:
filename: MyString
thumbnail: MyString
description: MyString
photo_1:
id:1
filename: train.jpg
thumbnail: train_t.jpg
description: My ride to work
photo_2:
id: 2
filename: lighthouse.jpg
thumbnail: lighthouse_t.jpg
descript...
2011 Aug 04
3
#create tests fail when I add FriendlyId to my model
...ame, :use_slug => true, :approximate_ascii => true
Here''s the test (using mocha):
def test_create_valid
Brand.any_instance.stubs(:valid?).returns(true)
post :create
assert_redirected_to brand_url(assigns(:brand))
end
Here''s the fixture:
one:
name: MyString
image_file_name: MyString
image_content_type: MyString
image_file_size: 1
image_updated_at: 2011-08-03 10:49:03
tease: MyText
description: MyText
All other tests pass, and if I comment out has_friendly_id, the create
tests pass as well. Does this ring any bells for anyone?
Tha...
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)
strap...
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 separated indeed
so I did the same, in a Python session...
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 (below), I obtain this message:...
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 class variable @@tab in
ActionView::Base::CompiledTemplates
I''ve searched t...
2008 Oct 20
0
CGI and NET::SSH in the same script problems
...'
require ''rubygems''
require ''net/ssh''
def do_sync_cmd( session, command )
session.open_channel do |channel|
channel.env("PATH", "/usr/pbs/bin:/acct/uzer/test/bin")
channel.exec("#{command}") do |ch, success|
abort @myString.concat("could not execute #{command}") unless
success
channel.on_data do |ch, data|
@myString.concat("cmd=>[#{command}] got stdout: \n#{data}")
channel.send_data "something for stdin\n"
end
channel.on_extended_data do |ch, type, d...
2010 Dec 06
10
testing chapter: agile web dev withrails
...mentInvalid: SQLite3::SQLException: table users has
no column named image_url: INSERT INTO "users" ("created_at",
"image_url", "title", "updated_at", "id", "description") VALUES
(''2010-12-06 16:04:02'', ''MyString'', ''MyString'', ''2010-12-06 16:04:02'',
298486374, ''MyText'')
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this...