Displaying 20 results from an estimated 113 matches for "2i".
Did you mean:
l2i
2014 Jan 19
1
formals() adds 0 to complex function arguments
...n using
roxygen2. The function has a complex-valued default argument, which is
picked up by roxygen2 using formals() to generate the corresponding Usage
section of the Rd file. Unfortunately, it appears that formals() reformats
complex numbers. Consider the example below,
test <- function(a = 1+2i){}
> args(test)
function (a = 1 + (0+2i))
NULL
> formals(test)
$a
1 + (0+2i)
As a result, R CMD check issues a warning that my Rd file is inconsistent
between Code and Docs. Redefining the function with this syntax (a = 1 +
(0+2i)) doesn't help, as a new 0 gets added to become 1 + (0...
2002 Jul 03
1
complex numbers in library function (PR#1737)
Full_Name: Alex Deckmyn
Version: 1.5.1
OS: Linux Mandrake 7.0
Submission from: (NULL) (193.190.63.62)
A short function in a library contains the complex number -2i :
phihat <- function(x)
{
x+ (-2i)
}
If i read the source file with source("phihat") this works fine. If I include it
as
a function in a library and read it with library(test), the function is still
read corectly, but when I print it out it shows as
> phihat
function (x)
{...
2006 Jun 13
17
reconstituting a date
In my view code, I have <%= datetime_select "in_out", "time_in" %>
which returns in params
:in_out: !map:HashWithIndifferentAccess
time_in(1i): "2006"
time_in(2i): "6"
time_in(3i): "12"
time_in(4i): "20"
time_in(5i): "24"
and I want to save that datetime to a column in the db...
if params[:user][:in_out] == "In"
@in_out.time_in = params[:in_out][:time_in]
elsif params[:user][:in_...
2006 Jul 26
2
text_field and date_select in collection
...ooks like:
<textarea cols="40" id="book_12_desc" name="book[12][desc]">foo</textarea>
the ID of a book record is there.
BUT i do not know, how to achieve this with the date_select helper?
the helper generates:
<select name="book[published_on(2i)]">
<option value="00">00</option
...
it should be name="book[12][published_on(2i)]"
how to do that? (:prefix, :discard_type did not work for me)
thanks
ondrej
2020 Nov 05
2
ssacli start rebuild?
...d)
physicaldrive 1I:0:1 (port 1I:box 0:bay 1, SATA HDD, 4 TB, OK)
physicaldrive 1I:0:2 (port 1I:box 0:bay 2, SATA HDD, 4 TB, OK)
physicaldrive 1I:0:3 (port 1I:box 0:bay 3, SATA HDD, 4 TB, OK)
physicaldrive 1I:0:4 (port 1I:box 0:bay 4, SATA HDD, 8 TB, OK)
physicaldrive 2I:0:5 (port 2I:box 0:bay 5, SATA HDD, 4 TB, OK)
physicaldrive 2I:0:6 (port 2I:box 0:bay 6, SATA HDD, 4 TB, OK)
physicaldrive 2I:0:7 (port 2I:box 0:bay 7, SATA HDD, 4 TB, OK)
physicaldrive 2I:0:8 (port 2I:box 0:bay 8, SATA HDD, 4 TB, OK)
I'd expect the rebuild to start automati...
2006 Jul 06
3
Understanding date_select naming conventions
I am using the date_select helper to generate date select elements in a
form.
I notice that the generated HTML shows that these selects have the
following names:
Month: current_job[StartDate(2i)]
Day: current_job[StartDate(3i)]
Year: current_job[StartDate(1i)]
I''m assuming that the Xi identifiers somehow specify the appropriate
date part from a date or time value.
Can anyone shed some light on how this works? Where can I get definite
info. on it?
Also, I am using select_...
2011 Jan 28
3
any similiar R fuction for matlab function 'fprintf'?
Dear All,
Currently, I am translating Matlab code to R. I met difficulties to translate such Matlab codes into R:
fprintf(fid,(' SPLITTING RESULTS '));
fprintf(fid,(' \n'));
fprintf(fid,' Data base to analyze is a matrix %4i x %2i ',[n m]);
fprintf(fid,' \n');
fprintf(fid,' h is %2i',h);
fprintf(fid,' \n');
fprintf(fid,' group=0 outlier.\n');
fprintf(fid,' group=-1 discriminator or observation removed by the rules.\n');
fprintf(fid,' \n');
Does anyone happen to know if R h...
2006 Apr 15
2
Multi-parameter assignment
Hi,
I''m trying to submit data from text boxes on a form to one variable in
my controller, in the same way that datetime_select has date(1i),
date(2i), etc for day, month, year, etc...
I''ve named my variables event[start_date(1i)] event[start_date(2i)] and
event[start_date(3i)] but this doesn''t seem to work and
event[:start_date] is blank ... any pointers would be useful! Can''t
seem to find any docs for this!
Che...
2019 May 21
2
print.<strorageMode>() not called when autoprinting
...lex":
3.6.0> print.integer <- function(x,...) "integer vector"
3.6.0> 1:10
[1] 1 2 3 4 5 6 7 8 9 10
3.6.0> print(1:10)
[1] "integer vector"
3.6.0>
3.6.0> print.complex <- function(x, ...) "complex vector"
3.6.0> 1+2i
[1] 1+2i
3.6.0> print(1+2i)
[1] "complex vector"
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Tue, May 21, 2019 at 9:31 AM Martin Maechler <maechler at stat.math.ethz.ch>
wrote:
> >>>>> William Dunlap via R-devel
> >>>>> on Thu, 16 M...
2018 Apr 12
0
issues with replicating data to a new brick
...ume, sync and then drop the old bricks.
starting point is:
Volume Name: Server_Monthly_02
Type: Replicate
Volume ID: 0ada8e12-15f7-42e9-9da3-2734b04e04e9
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: chastcvtprd04:/data/glusterfs/Server_Monthly/2I-1-40/brick
Brick2: chglbcvtprd04:/data/glusterfs/Server_Monthly/2I-1-40/brick
Options Reconfigured:
features.scrub: Inactive
features.bitrot: off
nfs.disable: on
auth.allow: 127.0.0.1,10.30.28.43,10.30.28.44,10.30.28.17,10.30.28.18,10.8.13.132,10.30.28.30,10.30.28.31
performance.readdir-ahead: on
d...
2006 Feb 08
6
can''t get date_select to work
...ck them
up from the hash in Booking.new(params[''booking'']).
I''ve got a ''booking'' object with parameters product, startdate and
enddate.
HTML snippets:
<select name="booking[startdate(1i)]">...
<select name="booking[startdate(2i)]">...
<select name="booking[startdate(3i)]">...
In the view controller method I create a booking object and set
startdate to Date.today+1, and enddate to Date.today+2. When the
page renders the dates are showing correctly according to how the
controller set them up,...
2006 Jun 12
2
date_select() in collection
...gt;
<%= date_select("contract[]", :starting_on, :index =>
@contract.contractor.id) %>
...
<% end -%>
Here are the request parameters:
{"commit"=>"Save", "portfolio"=>{"starting_on(1i)"=>"2006",
"starting_on(2i)"=>"6", "starting_on(3i)"=>"12",
"finishing_on(1i)"=>"2006", "customer_id"=>"1", "finishing_on(2i)"=>"6",
"finishing_on(3i)"=>"12"}, "id"=>"1"...
2006 Feb 28
1
Working with date_select ...
...ar,
month and date information. If I just leave it at that, great!
But what if now in the controller, I want to work with the date information. I
actually want to take the user input date and compute a new date some number of
days in the future.
How should I use "start_date(1i), start_date(2i), start_date(3i)" in a
controller to fill in a new SQL date column?
Does there exist helpers to convert from "start_date(1i), start_date(2i),
start_date(3i)" to a Ruby Class like Date or Time?
Page 203 of "Agile Web Development with Rails" implies that SQL Types like
&quo...
2009 Sep 18
1
inconsistency in attaching attributes to NULL
...628) and back to at least R 2.7.0 we get
inconsistent results when attempting to attach attributes to
a variable with the value NULL.
If we use attributes<- it finishes but changes the value to list().
> a<-NULL
> attributes(a)<-list(attr1="First attribute", attr2=2+2i)
> a
list()
attr(,"attr1")
[1] "First attribute"
attr(,"attr2")
[1] 2+2i
If we use attr<- it refuses to attach the attribute
> b<-NULL
> attr(b, "attr1") <- "First attribute"
Error in attr(b, "attr...
2006 Jan 05
13
Date Validation
Hi,
How can I validate date in model class
Thanks.
Sainaba.
--
Posted via http://www.ruby-forum.com/.
2008 Jun 13
2
Rails 2.1: invalid date automatically convertion
Hi all,
Rails 2.1 seems to converts the following parameters
{''birth(1i)''=''1990'', ''birth(2i)''=>''2'', ''birth(3i)''=>''31''}
into date ''1990-03-02'' automatically.
Is it able to inhibit this convertion?
--
makoto kuata
--~--~---------~--~----~------------~-------~--~----~
You received this message because y...
2006 Jun 27
1
order() (PR#9039)
...status
major 2
minor 2.1
year 2005
month 12
day 20
svn rev 36812
language R
An example demonstrating the problem:
x <- rep(2:1, c(2, 2)) + 1i*c(4, 1, 2, 3)
> x
[1] 2+4i 2+1i 1+2i 1+3i
> order(x)
Error in order(x) : unimplemented type 'complex' in 'orderVector1'
However sort() works with complex arguments
> sort(x)
[1] 1+2i 1+3i 2+1i 2+4i
The problem can be worked around either by
> order(Re(x), Im(x))
[1] 3 4 2 1
or, because order() allows subse...
2019 May 21
3
print.<strorageMode>() not called when autoprinting
...ger vector"
> > 3.6.0> 1:10
> > [1] 1 2 3 4 5 6 7 8 9 10
> > 3.6.0> print(1:10)
> > [1] "integer vector"
> > 3.6.0>
> > 3.6.0> print.complex <- function(x, ...) "complex vector"
> > 3.6.0> 1+2i
> > [1] 1+2i
> > 3.6.0> print(1+2i)
> > [1] "complex vector"
> >
> > Bill Dunlap
> > TIBCO Software
> > wdunlap tibco.com
> >
> >
> > On Tue, May 21, 2019 at 9:31 AM Martin Maechler <
> maechler at stat.math.ethz.ch>...
2000 Mar 29
2
regularly lattice & neighbors
Dear R-users,
Is there a procedure to identify neighbors in a regular lattice using either a
"rook" or a "queen" criterium? To be more specific, suppose:
My lattice:
1 2 3
4 5 6
7 8 9
"Rook" Neighbors
1 has neighbors 2,4
2 has neighbors 1,3,5
...
5 has neighbors 2,4,6,8
"Queen Neighbors"
1 has neighbors 2,4,5
2 has neighbors 1,3,4,5,6
For each case,
2010 Jul 26
1
form date helper with text year
I have a date where the year range is more then I want to define in a
select_date scaffold generated year range.
My idea was to have the year entered as a text field and the month and
day using something like:
<%= select_month @person.born,:prefix => :person ,:field_name =>
"born(2i)" %>
<%= select_day @person.born,:prefix => :person , :field_name =>
"born(3i)" %>
<%= f.text_field ?????? or text_field_tag ???????? field_name =>
"born(1i)" %>
I just can''t seem to find the set of options to build the year tag.
Guess...