Displaying 20 results from an estimated 10000 matches similar to: "How do I construct a one matrix from another? (newbie)"
2013 Sep 02
1
R dataframe and looping help
HI,
You may try this:
dat1<- read.table(text="
CustID TripDate Store Bread Butter Milk Eggs
1 2-Jan-12 a 2 0 2 1
1 6-Jan-12 c 0 3 3 0
1 9-Jan-12 a 3 3 0 0
1 31-Mar-13 a 3 0 0 0
2 31-Aug-12 a 0 3 3 0
2 24-Sep-12 a 3 3 0 0
2 25-Sep-12 b 3 0 0 0
",sep="",header=TRUE,stringsAsFactors=FALSE)
dat2<- dat1[,-c(1:3)]
res<- lapply(seq_len(ncol(dat2)),function(i)
2004 Sep 11
3
SAS to R migration questions
Hi,
I'd like to get away from SAS, but I don't really know R well enough at
this point to know if it would be good for this project. I tried to
describe the essence of the project below without getting bogged down in
details.
It starts when I receive a data flat file. There's lots of columns, but
the relevant ones are:
custid (customer ID number)
saledt (date of sale)
2010 Jun 05
1
Problem with GROUP()
Hello list,
using asterisk 1.4.30 and trying GROUP() and GROUP_COUNT() for the first
time... Having some troubles.
This the dialplan (using a sub) :
exten => s,n,Set(_custID=${custID})
exten => s,n,GROUP(${custID})
exten => s,n,NoOp(grouppcount = GROUP_COUNT(${custID}))
exten => s,n,GoToIf($[ ${GROUP_COUNT(${custID})} > 2 ]?maxreached)
The CLI shows :
[Jun 5 16:06:26] --
2008 Feb 01
2
the "union" of several data frame rows
Hi,
I have a question about how to obtain the union of several data frame
rows. I'm trying to create a common key for several tests composed of
different items. Here is a small scale version of the problem. These
are keys for 4 different tests, not all mutually exclusive:
id q1 q2 q3 q4 q5 q6
1 A C
2 B D
3 A D B
4 C D B D
I would like
2018 Feb 25
1
reshaping column items into rows per unique ID
Hi Allaisone,
I took a slightly different approach but you might find this either as or
more useful than your approach, or at least a start on the path to a
solution you need.
df1 <-
data.frame(CustId=c(1,1,1,2,3,3,4,4,4),DietType=c("a","c","b","f","a","j","c","c","f"),
2006 Apr 26
5
accessing created_on causes type error
I assume that this is some newbie stupidity, but I haven''t found my
way around this problem. I have an ActiveRecord object fetched
from the database, and I need to evaluate the contents of the
updated_on field. However, *any* attempt to access that data in the
program results in a TypeError with the message ''no implicit conversion
from nil to integer''.
cust =
2010 Sep 12
1
non-integer key for data.table
Hi all,
Say if I have a data table which consists of 4 column: itemID, location and
price, which location is a text field and itemID and location together forms
the primary keys.
when I tried to run setkey (DT, itemID, location), I got the following
message:
Error in setkey (DT, itemID, location) :
All keyed columns must be storage mode integer
Is there any way I could define a non-numerical
2006 Apr 29
4
Event.observe mystery
Hi,
I have a class ''Menu'' with a method ''addItem''. The method (simplified)
looks like this:
addItem: function(itemId, text)
{
this.container.innerHTML += ''<div id="''+itemId+''">''+text+''</div>'';
Event.observe(itemId, ''mouseover'',
2017 Oct 09
1
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
Hi Hemant,
Here is an example that might answer your questions. Please don't run
previous code as it might not work.
I define the break values as arguments to the function
(rbreaks,fbreaks,mbreaks) If you want the breaks to work, make sure that
they cover the range of the input values, otherwise you get NAs.
# expects a three (or more) column data frame where
# column 1 is customer ID,
2017 Oct 09
0
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
I'm getting all the rows as NA in Cscore and almost most of the
observation in R and F and M are also NA.
what can be the reason for this. also suggest me the appropriate solution.
On 9 October 2017 at 15:51, Jim Lemon <drjimlemon at gmail.com> wrote:
> Hi Hemant,
> Here is an example that might answer your questions. Please don't run
> previous code as it might not work.
2017 Oct 09
2
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
I seriously doubt that you are running the code I sent. What you have
probably done is to run your data, which has a different date format,
without changing the breaks or the date format arguments. As you
haven't provided any example that shows what you are doing, I can't
guess what the problem is.
Jim
On Mon, Oct 9, 2017 at 9:40 PM, Hemant Sain <hemantsain55 at gmail.com> wrote:
2008 Jan 13
3
right usage of bdrb
Hi,
i''m going to implement a syndication-service, which will get lists in
xml with some meta-data an enclosed video files, which will get encoded
at the end. The syndication run will be startet every five minutes of
a full hour.
So i thought to build 4 Worker. One for checking which feeds to
syndicate (syndication_worker) at a specific time, one for processing
the list
2017 Oct 10
0
Help RFM analysis in R (i want a code where i can define my own breaks instead of system defined breaks used in auto_RFM package)
Hello Jim,
i have converted all my variable data type according to your attached
example including date, and my dataset looks like this.
ID purchase date
1234 10.2 2017-02-18
3453 18.9 2017-03-22
7689 8 2017-03-24
but when I'm passing the data
2005 Jul 18
1
vorbis.com
Whoever is responsible for updating vorbis.com, I think it's about time
the old and outdated Tobias DirectShow filters were removed from the
Windows section and replaced with http://www.illiminable.com/ogg. This
supports playing Ogg Vorbis, Ogg Speex, Ogg Theora, Ogg FLAC and native
FLAC in Windows.
The following website should also be updated but I'm not sure who
submitted it.
2010 Sep 09
1
syntax error, unexpected '<token>'
Hello list,
getting warning : *syntax error, unexpected '<token>'*
dialplan :
exten => pbx,n,Macro(CheckNetworkProblems,${custID})
exten => pbx,n,NoOp(status = ${STATUS})
exten => pbx,n,GoToIf($["${STATUS}"="congestion"]?backup:nocongestion)
CLI :
[Sep 9 12:27:07] -- Executing [pbx at cust:15]
NoOp("SIP/test13-0000002a",
2004 Oct 03
3
asterix and phone system
I am currently looking at putting together an Asterisk PBX system for my home
office. One of the things I need is an expandable 2-line corded/cordless
phone system.
If I wasn't using Asterisk, I'd be getting one of these AT&T systems with 2
extra handsets.
http://telephones.att.com/attui/shop/product_detail.cfm?itemID=ad53fe08-495e-41b6-b390-3aaa1c84cc40
So, the question is,
2005 Mar 22
2
Illiminable DS filters for FLAC don't work
At my company we have a bunch of music in FLAC format. We want to play
it using the Windows Media Player, but none of us can get the
illiminable DS filters to work. Here are some details.
Illiminable DS filters
http://www.wmplugins.com/ItemDetail.aspx?ItemID=681
http://www.illiminable.com/ogg/
We are using the latest build available on this website, and I have read
all the known issues.
My
2006 Feb 14
6
[newb] Find vs Find :all question
I''m playing out with writing an online store.
So far it has accounts, addressbooks, and orders, and those 3 are tied
together with an customer ID. I also have orderDetails, which are
associated to the order via an order number. See models below...
When I do the following I can access the orderDetails information just
fine:
@order = Order.find(params[:id]) # i pass it a customer
2009 Dec 08
2
Starting and installing Dahdi (2.2.0)?
Hello
Unless I overlooked it, the "Asterisk Reference Information
Version 1.6.1.6" at www.asterisk.org/docs doesn't include instruction
on how to start Dahdi when used to drive a TDP PCI card (OpenVox A400P
with a single FXO module
www.openvox.cn/products/show.php?itemid=20&lang=2).
I'd like to know...
1. How to start Dahdi manually. Is this the right way?
modprobe
2004 Aug 26
1
Novell Evolution Connector
I just built a version of the Novell Evolution Connector (to use
Evolution with a MS exchange server) that works with
RHEL/WBEL/CentOS/TaoLinux.
You can get it from here if you are interested...
http://www.hughesjr.com/component/option,com_docman/Itemid,34/task,view_category/catid,16/order,dmdate_published/ascdesc,DESC/
Here is the Novell link:
http://www.novell.com/products/connector/
Johnny