Displaying 20 results from an estimated 21 matches for "gblevin".
Did you mean:
gblevins
2005 Aug 25
1
Attempting to recode elements contained in a list
...lids Cell phones 0 0 7
193 Plastic lids Canned goods 0 0 7
197 Plastic lids Hand/dish towel 3 0 12
Thank you.
Greg Blevins
The Market Solutions Group
Windows xp, 2.1.1
Gregory L. Blevins
Vice President, Partner
The Market Solutions Group, Inc.
gblevins at marketsolutionsgroup.com
Office phone: 612 392-3163
Cell phone: 612 251-0232
"What is at the beginning but a small error, swells to huge proportions at the close." Aristotle
2003 Oct 07
3
Problem getting an ifelse statment to work
...if (a == 2 || b == 2) return(2)
+ if (a == 3 || b == 3) return(3)
+ if (a == 4 || b == 4) return(4)
+ NA
+ }
> mapply(decision, qs2, qs9)
[1] 2 1 1 3 4 3 1 1 1 4 1 2 3 1 4 3 1 2 2 3
Hope this is what you want.
Andy
> -----Original Message-----
> From: Greg Blevins [mailto:gblevins at mn.rr.com]
> Sent: Monday, October 06, 2003 11:21 PM
> To: R-Help
> Subject: [R] Problem getting an ifelse statment to work
>
>
> Hello R experts,
>
> I trust I have a simple request. I have a dataframe which
> among its contents are two variables, qs2 and qs9,...
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
2004 Jun 06
4
Request help writing a function
I have been wrestling with this function for quite a while, and am not making headway.
1) I want to apply a function to the following columns of a dataframe:
myfunction. <- apply(ph5028[,c(83:107)],2,function(x) ...
2) Within each of the above columns there is a single numeric code, 1, 2 or 3 or an NA.
3) My goal is to determine the percent of time each person used a 2 code. So if a person
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:
2003 Jan 06
2
R and file size
I will be involved with an analysis based on a file that will be roughly 25 meg. Assuming I have enough memory, is their any limitations to using R on a file this large.
Thank you,
Gregory L. Blevins
Vice President, Partner
The Market Solutions Group, Inc.
gblevins at marketsolutionsgroup.com
Office phone: 612 392-3163
Cell phone: 612 251-0232
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.
2006 Apr 27
1
deleting rows with the same ID if any meet a condition
Hello R masters,
This request is being made after searching through archive mailing list.
I have a "many" table in a medical application where each injury a person suffers is recorded as a separate row. In my toy example below it means respondent #1 had three injuries and so on.
If x2 equal 2 then I want to delete all the rows for that person from the dataframe--see Before and After
2003 Sep 20
1
grep in version 1.8 (PR#4231)
Full_Name: Gregory L. Blevins
Version: 1.8
OS: Windows 2000
Submission from: (NULL) (65.29.54.28)
I see this when I open 1.8
Error in grep("united.states", Sys.getlocale("LC_CTYPE"), TRUE) :
5 arguments passed to "grep" which requires 6.
R : Copyright 2003, The R Development Core Team
Version 1.8.0 alpha (2003-09-18)
R is free software and comes with
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
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 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
2003 Jul 25
1
Difficulty replacing NAs using Hmisc aregImpute and Impute
Hello R experts
I am using Hmisc aregImpute and Impute (following example on page 105 of The
Hmisc and Design Libraries).
*My end goal is to have NAs physically replaced in my dataframe. I have
read the help pages and example in above sited pdf file, but to no avail.
Here is example of what I did.
Ph, my data frame, is attached.
> xt <- aregImpute (~ q5 + q22rev02 + q28a, n.impute=10,
2004 Apr 19
0
Seeking help with multcomp
Hello R users,
I am having difficulting getting multcomp to run.
I have a dataframe attached with a numeric variable q12a and a numeric variable quota (which is really a classification variable).
quota has 10 levels and unequal sample sizes.
a12a has some missing data.
I am interested in doing pairwise testing across the 10 quota groups on q12a. Using the ctest package the following code
2004 Jun 14
1
error running sammon
Hello,
I am inputing a 17 x 17 symetric matrix to sammon. The matrix is a co-occurance matrix with no missing data. If this is at all relevant, running hclust on this matrix works.
> samx <- sammon(q23axproduct)
I receive the following error:
Error in sammon(q23axproduct) : initial configuration must be complete
In addition: Warning messages:
1: some of the first 2 eigenvalues are
2004 Oct 21
0
Hmisc: Using stratified weighted means (wtd.mean) within a function
Hello list,
I have the following function which, as you can see, uses mean:
meanratings <- round(apply(stack03[,c(102:121)],2,function(x) (tapply(x ,actcode, mean, na.rm=T))), digits=1)
The above function yields the following output:
q27a q27b q27c q27d q27e q27f q27g q27h q27i q27j q27k q27l q27m q27o q27p
1 7.8 8.1 7.7 7.9 7.9 NaN NaN 8.4 7.8 7.0 7.6 NaN NaN 7.1 6.0
2
2005 Apr 26
1
Problems installing and updating packages for 2.1.0 on Windows 2000
Hello,
I am running R 2.1.0 on Windows 2000.
When I attempt to install or update packages, regardless of whether I use the menu or command line, I get the following error.
> utils:::chooseCRANmirror()
> utils:::menuInstallPkgs()
Warning message:
unable to connect to 'cran.cnr.Berkeley.edu' on port 80.
Warning: unable to access index for repository
2005 Aug 23
1
Seeking help with an apparently simple recoding problem
Hello,
I have struggled, for longer than I care to admit, with this seemingly simple problem, but I cannot find a solution other than the use of long drawn out ifelse statements. I know there has to be a better way. Here is stripped down version of the situation:
I start with:
a <- c(1,0,1,0,0,0,0)
b <- c(1,1,1,1,0,0,0)
c <- c(1,1,0,1,0,0,0)
rbind(a,b,c)
[,1] [,2] [,3] [,4] [,5]
2004 Nov 29
1
Seeking help with a simple loop construction
Hello,
I have a df, pp, with five variables:
> nobs(pp)
q10_1 q10_2 q10_3 q10_4 actcode
1620 1620 1620 1620 1620
I want to create a loop to run four xtabs (the first four variables above by the fifth) and then store the results in a matrix. Below I make my intent clear by showing the output of one xtab which is inserted into a matrix.
> a <- xtabs(q10_1 ~
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