similar to: Request help writing a function

Displaying 20 results from an estimated 3000 matches similar to: "Request help writing a function"

2004 Jun 08
2
Recoding a multiple response question into a series of 1, 0 variables
Hello R folks. 1) The question that generated the data, which I call Qx: Which of the following 5 items have you performed in the past month? (multipe response) 2) How the data is coded in my current dataframe: The first item that a person selected is coded under a field called Qxfirst; the second selected under Qxsecond, etc. For the first Person, the NAs mean that that person only selected
2015 Aug 10
2
webrtc no audio
hello, i'm facing strange problem asterisk13.5 + chan_sip wss transport + SIPML5 1.5.230 person1 to person3 are behind different NATs audio devices double checked call from person1(chrome) to person2(chrome) works call from person1(chrome) to person 3(chrome) - no audio on both side (RTP flowing only in one direction) call from person2(chrome) to person 3(chrome) - no audio on both side
2006 Jul 28
2
has_many :through with multiple paths
Hi all. I am currently thinking about how to do the following: I have the following models. Team Person Team has various positions (manager, programmer etc.) I would like each one of those positions to reference one or more Person records. A single Person record could be on 6 different teams at the same time in different roles. the same person could even be on the same team multiple times
2020 Oct 05
2
S4 - inheritance changed by order of setClassUnion and setAs()
Dear colleagues, there is a behaviour with S4 (virtual) classes that I find very hard to understand: Depending on the position of setAs(), the tree of inheritance changes. This is my baseline example that defines the classes "grandma", "mother", "daughter" and a virtual class "mr_x". For a new instance if "daughter", "mr_x" is betweeen
2017 Nov 15
2
R6 object that is a list of referenced object
Dear community, I am having a class, let's say Person, Person <- R6Class("Person", public = list( idPerson = NULL, name = NULL, age = NULL, initialize = function(idPerson = NA, name = NA, age = NA) { self$idPerson <- idPerson
2017 Nov 16
0
R6 object that is a list of referenced object
See below. On Wed, 15 Nov 2017, Cristina Pascual wrote: > Dear community, > > I am having a class, let's say Person, > > Person <- R6Class("Person", > public = list( > idPerson = NULL, > name = NULL, > age = NULL, > initialize =
2003 Dec 19
2
GotoIfTime help
Hey All, I need to forward an extension to an other depending on the current time but I could not get it done with GotoIfTime. What I'm trying to do is ring on the extension 1 if time is between 8:00AM and 2:00PM and on extension 2 if is between 2:01PM 11:00PM. exten => 111,1,GotoIfTime(8:00-14:00|*|*|1-12?333) exten => 111,2,Dial(${Person1}) exten => 111,3,Dial(Hangup) exten
2006 Aug 12
1
has and belongs to many different?
Is there such a thing? I am thinking of an application that has something like this: 1. person has many things - there is a ''persons'' table 2. the things he has are stored in a table that is something like this person_id, thing_table_name, thing_id For example, it may map to person1, books, 23 #Person 1 owns book 23 person1, books, 25 #Person 1 owns book 25
2017 Oct 18
1
conformal predictions
Dear community, I want to use conformal prediction to measure how good are my svm-regression predictions (having used library e1071). I have gone through the conformal package documentation. But I'm pretty newer and need some more and detailed examples. Can anybody help me? Thanks in advance, [[alternative HTML version deleted]]
2006 Aug 15
2
How to access attribute in a self-referential many-to-many relationship
Hello List, I created a self-referential many-to-many relationship (as described in the book Rails recipe #18), where I have a model that has many-to-many relationships with itself. In this case, it''s person who can become friends. The join table looks like this: mysql> select * from friends_people; +-----------+-----------+-----------+ | person_id | friend_id | confirmed |
2005 Aug 25
1
Attempting to recode elements contained in a list
Hello R-Masters, I have a list 's' with three elements, as shown below. I want to recode a.a, a.a2, and a.a3 to NA if the value in a.a is less than 3. I reivewed my Modern Applied Statistic Book, the online help and did some searching of R-help on the internet. I explored unlist and as.list.data.frame in an attempt to isolate the third element of the list s, but this was not helpful.
2004 Apr 03
3
Seeking help for outomating regression (over columns) and storing selected output
Hello, I have spent considerable time trying to figure out that which I am about to describe. This included searching Help, consulting my various R books, and trail and (always) error. I have been assuming I would need to use a loop (looping over columns) but perhaps and apply function would do the trick. I have unsuccessfully tried both. A scaled down version of my situation is as follows:
2002 Oct 31
2
Problems of groups accessing shared directory
Hello, I have problems with people having different groups who access a shared directory via samba. The requirements are: 1. There are people with group "group1" and group "group2" in /etc/passwd 2. 3 people from group "group1" and 2 people from group "group2" are allowed to access a shared directory and have read/write access to that directory. Our
2003 Oct 07
3
Problem getting an ifelse statment to work
This is a "long" way; i.e., not necessarily efficient: > qs2 [1] 2 1 1 4 4 4 1 1 1 4 2 4 3 1 4 3 3 2 4 3 > qs9 [1] 4 4 1 3 4 3 1 3 1 4 1 2 3 3 4 4 1 4 2 3 > decision <- function(a, b) { + if (a == 1 || b == 1) return(1) + if (a == 2 || b == 2) return(2) + if (a == 3 || b == 3) return(3) + if (a == 4 || b == 4) return(4) + NA + } > mapply(decision,
2004 Mar 04
4
A file manipulation question
Hello R experts, The following problem outstrips my current programming knowledge. I have a dataframe with two fields that looks like the following: ID Contract 01 1 01 1 02 2 02 3 02 1 03 2 03 2 03 2 03 1 03 1 03 1 etc... I would like to end up with a dataframe with one row per ID where the value in the contract field would be the
2004 Dec 21
2
How to display each symbol in a different color using plot with summary.formula.reverse
Dear R Masters, I have searched high and low (the help archives and my various R reference material and help files) for a solution to what appears to me to be quite a simple problem. In the following syntax, variable n10 has three levels. I would like the symbols that appear in the graph for these three levels to be different colors. The best I have been able to do is to have the Key display
2007 Dec 27
2
Help with lm and multiple linear regression? (Plain Text version)
(Apologies the previous version was sent as rich text) Hello, I'm new to R, but I've read the intro to R and successfully connected it to an instance of mysql. I'm trying to perform multiple linear regression, but I'm having trouble using the lm function. To start, I have read in a simply y matrix of values(dependent variable) and x matrix of independent variables. It says both
2003 Aug 18
1
Would like to apply a weight variable to the summary function in Hmisc
Hello, In the Hmisc package, functions describe and summarize can explicitly take a weight variable. My question is can a weight variable be applied when using 'summary'? For example, using...summary(var1 ~ var2) I would like to weight the data by var 3 (same length). Is this possible? Thanks a lot. Greg Blevins The Market Solutions Group, Inc.
2004 Oct 06
8
Dataframe manipulation question
Hello, I have a data frame that has three fields. Resp# ActCode ProdUsed 100 3 2 100 3 2 100 4 3 100 4 3 101 3 6 102 2 1 102 3 1 103 5 1 103 5 1 103
2006 May 15
1
Trying to get values to display on horizontal barchart
Hello, R 2.3.0 Windows XP I have spent quite a bit of time trying to resolve my problem below, which included a R site search. The "vertical bars" syntax below produces a vertical bar chart with the values displayed above each bar. I want to cast this graphic horizontally, but I have not been able to arrive at a suitable outcome. The best I have been able to do, using the second block