Displaying 20 results from an estimated 500 matches similar to: "Help with R script"
2017 Jul 13
0
Help with R script
Hi Vijayan,
one way going about it *could* be this:
library(dplyr)
library(tidyr)
library(purrr)
ex_dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName:
fname2", "Fval: Fval2.name2", "FName: fname3")
data.frame(x = ex_dat) %>%
separate(x, c("F1", "F2"), sep = ": ") %>%
filter(F2
2017 Jul 13
2
Help with R script
Using Ulrik?s example data (and assuming I understand what is wanted), here is what I would do:
ex.dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName: fname2", "Fval: Fval2.name2", "FName: fname3")
tst <- data.frame(x = ex.dat, stringsAsFactors=FALSE)
sp <- strsplit(tst$x, ':', fixed=TRUE)
chk <-
2017 Jul 14
0
Help with R script
@Don your solution does not solve Vijayan's scenario 2. I used spread and
gather for that.
An alternative solution to insert mising Fval - picking up with Don's
newtst - is
newtst <- c("FName: fname1", "Fval: Fval1.name1", "FName: fname2", "Fval:
Fval2.name2", "FName: fname3", "FName: fname4", "Fval: fval4.fname4")
2006 Jul 06
3
Accessing form field contents
I have an HTML form on the screen, that is connected to a database
(standard Ruby way). I found that there are people that would rather not
fill in this information, but would rather search Amazon for the info.
Therefore, I added a link to the right of one of the fields that, when
pressed, will search Amazon for what ever you typed into that field.
So, how can I do that? At first I tried
2010 Jan 15
2
[LLVMdev] [PATCH] - Union types, attempt 2
On 01/15/2010 11:37 AM, Talin wrote:
> Yes, that's closer to the frontend semantics: the variants of a
> union type don't have any natural ordering, so list semantics could
> cause problems.
I agree. I probably shouldn't even comment, as I know so little about
LLVM. But I've hand-written a couple kLOC of IR now and am starting to
get a feel for the
2006 Jul 12
0
Form validation with Javascript does not work
Hello,
i try to validate with JS if a Formfield has been filled with data.
Usually I use "onsubmit()" in the form.
My Code is
<%= start_form_tag :action => ''update'', :id => @person.id,
"onsubmit"=>"return
isDateSet(document.forms[0].elements[''fieldname''].value)"; %>
The JS-function returns false if length of
2006 Feb 23
3
Codec order sent wrong from Asterisk
I'm communicating a softphone (SJPhone) to a Grandstream phone GXP-2000.
The codec order on each one is the next:
SJPhone: GSM - iLBC - PCMA - PCMU
GXP2000: G729 - GSM - PCMA - PCMU
(I have a G729 license, so there's no problem with transcoding G729)
In my sip.conf, I've defined the following codec order:
disallow=all
allow=g729
allow=gsm
allow=g726
allow=alaw
allow=ulaw
And my
2005 Sep 24
2
Asterisk returns 484 ADDRESS INCOMPLETE for incoming SIP calls
I'm new to asterisk and need some help with getting a SIP connection
working.
I am trying to establish a termination point/DID number in another
country. I am currently running Asterisk CVS-HEAD. My foreign provider
uses SIP and authenticates via IP address. I am not required to
register my SIP connection in order to send or receive calls.
Can someone help me with how to understand the
2012 Sep 09
1
Solving a system of two equations
Hi,
I am trying to find a simple way to numerically solve a system of two
equations equal to zero with two unknowns (x_loc and y_loc). Here is a mock
data set and below it, the equations I need to solve.
theta<-c(180,135,90)/(2*pi)
x<-c(0,0,15)
y<-c(20,0,0)
0 =
-sum((y_loc-y)*(sin(theta)*(x_loc-x)-cos(theta)*(y_loc-y))/(((x_loc-x)^2+(y_loc-y)^2)^0.5)^3)
0 =
2007 Oct 01
4
Need Help with Custom Associations
I''ve read the Rails Envy AAF tutorial at
http://railsenvy.com/2007/2/19/acts-as-ferret-tutorial and its given me
some really good ideas.
My problem lies in having AAF search the target Model''s child tables.
I have no problem at all doing something like:
acts_as_ferret :fields => [:title, :update_collection, :member_name]
def member_name
return
2010 Jan 20
2
Error meaning
Hi r-users,
I have the following code to solve 4 simultaneous eqns with 4 unknowns using newton iteration method. But I got the error message:
pars <- c(1.15, 40, 50, 0.78)
newton.input2 <- function(pars)
{ ## parameters to estimate
alp <- pars[1]
b1 <- pars[2]
b2 <- pars[3]
rho <- pars[4]
f1 <- pars[1]*pars[2]
f2 <-
2006 Sep 26
15
RE: Individual passwords for guest VNC servers ?
> Thanks all point about security, I''ll do as follows.
> I thought that the point was the following two.
>
>
> 1. Storage place of encrypted password
> Should I store it in /etc/xen/passwd ?
> Or, should I wait for DB of Xen that will be released in
> the future?
The xend life cycle management patches were posted by Alistair a couple
of months back.
2006 May 02
0
YAML failing to de-serialize
I''m seeing this same problem that Josh was seeing back on March 23rd
(see below)
I''ve got the following YAML snippet stored in a text field:
"--- !ruby/object:FieldValue \nattributes: \n item_id: 60\n title:
Test\n field_id: 15\n created_by_id: 5\n locale: en\n link:
www.cclearn.com\n comment: this is a test\n created_at: 2006-05-02
15:43:14.256792 Z\nnew_record:
2010 Jan 16
0
[LLVMdev] [PATCH] - Union types, attempt 2
Dustin Laurence wrote:
> On 01/15/2010 11:37 AM, Talin wrote:
>
>> Yes, that's closer to the frontend semantics: the variants of a
>> union type don't have any natural ordering, so list semantics could
>> cause problems.
>
> I agree. I probably shouldn't even comment, as I know so little about
> LLVM. But I've hand-written a couple
2006 Jun 12
2
conditional validation
Hi how can I validate a field only if another field is set to a specific value?
I tried to use
validates_length_of :fieldname, :maximum => 100, :if =>
:otherfieldname == ''myvalue''
But doesn''t work
Thanks
Paolo
2010 Jan 15
0
[LLVMdev] [PATCH] - Union types, attempt 2
On Fri, Jan 15, 2010 at 12:41 AM, Joachim Durchholz <jo at durchholz.org>wrote:
> Talin schrieb:
>
> Well, the fact that union members have to be indexed by number means that
>> the ordering has to be part of the type - so even though type-theoretically
>> union { i32, float } is the same as union { float, i32 }, in my
>> implementation they are distinct types.
2010 Jan 15
2
[LLVMdev] [PATCH] - Union types, attempt 2
Talin schrieb:
> Well, the fact that union members have to be indexed by number means
> that the ordering has to be part of the type - so even though
> type-theoretically union { i32, float } is the same as union { float,
> i32 }, in my implementation they are distinct types. However, from the
> standpoint of a frontend, this is not a great concern, because the
> frontend
2009 Mar 23
4
newton method
Hi R-users,
Does R has a topic on newton's method?
Thank you for the info.
2013 Jan 31
2
[LLVMdev] Tablegen problem populating TSFlags
Jakob, I think this exactly what's happening. I debugged the
resolveReferences for the ADD down into the resolve of TSFlags. It
calls VarInit::getFieldInit for the "Val" field of "foo". The code is:
Init *VarInit::getFieldInit(Record &R, const RecordVal *RV,
const std::string &FieldName) const {
if (isa<RecordRecTy>(getType()))
2005 Oct 13
3
Optim with two constraints
Hi R-list,
I am new to optimization in R and would appreciate help on the following
question. I would like to minimize the following function using two
constraints:
######
fn <- function(par,H,F){
fval <- 0.5 * t(par) %*% H %*% par + F%*% par
fval
}
# matrix H is (n by k)
# matrix F is (n by 1)
# par is a (n by 1) set of weights
# I need two constraints:
# 1.