Displaying 20 results from an estimated 900 matches similar to: "dont know how to use :include"
2012 Feb 28
1
group calculations with other columns for the ride
Hello,
I can get the median for each factor, but I'd like another column to go
with each factor. The nm column is a long name for the lvls column. So
unique work except for the order can get messed up.
Example:
x =
2009 Dec 02
1
Lattice: multiple data sets on same plot
Hi,
I have two data sets; one is a population and the other a sample of
that population. I am trying to plot both on the same trellis display.
# Example data set with two numerical attributes and two categorical
pop <- data.frame(var1=rnorm(2000, 2000, 500), var2=rnorm(2000, 2000, 500))
cat<-(runif(2000)<=.5)+0
for(i in 1:length(cat)){
if(cat[i] == 0){
pop[i,"cat1"] =
2011 Jan 17
2
matrix manipulations
Hi,
I am having some difficulties with matrix operations. It is a little hard to explain it so please bear with me. I have a very large data set, large enough that it needs to be split in parts in order to deal with. I can work things on these "parts" but the problem lies in adding together these parts for the final answer.
So that been said, let's say that i split the data in 2
2006 Aug 24
1
Using a 'for' loop : there should be a better way in R
I need to apply a yearly inflation factor to some
wages and supply some simple sums by work category. I
have gone at it with a brute force "for" loop approach
which seems okay as it is a small dataset. It looks
a bit inelegant and given all the warnings in the
Intro to R, etc, about using loops I wondered if
anyone could suggest something a bit simpler or more
efficent?
Example:
2010 Sep 29
0
R Graphic - Tellis as a potential
Hello all,
I have been meaning to learn R for a while and have just subscribed to this
list. I am planning to give R a shot at one of my live projects. I am looking
to explore graphical features of R on my data below.
Sample Data:
Cat1 - Cat2 - Cat3 - Cat4 - NumPeople - Salary
H - L - H - L - 100 - 50000
L - L - L - L - 40 - 30000
- H - H - - 100 - 45000
Cat1 through Cat4 are
2010 Jul 14
1
Dot Plot with Confidence Limits
Hi,
I have the following dataset and I would like to create a dotplot with
confidence limits:
CAT1 CAT2 MEAN Lower
Upper
1 1 1 0.619 0.392
0.845
2 1 10 1.774 1.030
2.518
3 1
2010 Apr 12
2
Interpreting factor*numeric interaction coefficients
Dear all,
I am a relative novice with R, so please forgive any terrible errors...
I am working with a GLM that describes a response variable as a function of
a categorical variable with three levels and a continuous variable. These
two predictor variables are believed to interact.
An example of such a model follows at the bottom of this message, but here
is a section of its summary table:
2011 Apr 12
2
Converting a categorical variable to multiple dichotemous variables
I have a categorical variable in a dataframe similar to the following...
cat
1
1
3
2
4
I need to convert it to 4 dichotemous variables for each observations like...
cat1 cat2 cat3 cat4
1 0 0 0
1 0 0 0
0 0 1 0
0 1 0 0
0 0 0 1
Thanks in advance!
Shane
2003 Dec 16
2
Fw: [S] plot stacked bar chart in R
posting the question in r-help@ to get more feedback :-)
thanks,
Yun-Fang
----- Original Message -----
From: "Yun-Fang Juan" <yunfang at yahoo-inc.com>
To: <s-news at wubios.wustl.edu>
Sent: Tuesday, December 16, 2003 2:04 PM
Subject: [S] plot stacked bar chart in R
> Hi,
> I am trying to plot a stacked bar chart in R but am not able to find the
> documentation.
2010 Oct 23
1
Summarizing For Values with Multiple categories
Hi all,
I have some data as follows.
Cat1 Cat2 Cat3 COG Counts
A B C COG1 10
B D COG2 20
C COG3 30
D COG4 40
I would like to sum all the counts for each category:
A B C D
10 30 40 60
>CAT2COG<-
2012 Nov 27
1
For-loop,string variables, and the $-operator
Hi all,
First time poster, so sorry if I commit some breech of posting etiquette.
My problem is as follows. I have a data frame where each column represents
a category and the individual data points in each category are binary
responses (in this case they are actually 1's and 0's). What I want to
extract are the counts for each category and put them in a vector. To do
that I used the
2013 Jan 01
1
Order variables automatically
Hi,
I have a dataset with 6 categorical variables. I have used this following code to make the variables u1-u6 ordered factors and this works well.
cat1cat2 cat3 cat4 cat5 cat6
? 0 ? ?? 1 ? ? 1????? 0 ??? 0? ?? 1
? 1 ? ?? 1 ? ? 0 ? ?? 0 ? ? 0 ? ? 0
.......
....
############
data<-read,table("example.txt")
data <- as.data.frame(lapply(data, ordered))
############
Now,
2007 Dec 19
3
median of binned values
Dear list,
I have a vector (array, table row, whatever is best) of frequency values
for categories (or bins), and I need to find the median category.
Trivial to do by hand, but I was wondering if there is a means to do it
in R in an elegant way.
The obvious medioan(vector) returns the median frequency for the binns,
and that is not what I want. i.e,:
freq
cat1 1
cat2 10
2011 Aug 06
1
help with predict for cr model using rms package
Dear list,
I'm currently trying to use the rms package to get predicted ordinal
responses from a conditional ratio model. As you will see below, my
model seems to fit well to the data, however, I'm having trouble
getting predicted mean (or fitted) ordinal response values using the
predict function. I have a feeling I'm missing something simple,
however I haven't been able to
2013 Mar 21
1
Error Message During ANOVA
I am teaching myself R for use in Psych research. I don't understand the error message I am getting or how to fix it. Any suggestions will be greatly appreciated
df1=read.table("fastfood.txt", header=TRUE); df1
>
> c(t(as.matrix(df1)))
>
> r = c(t(as.matrix(df1))) # response data
>
> r
>
f=c("item1","item2", "item3")
> k=3
>
2008 Jan 10
1
data.frame manipulation: Unbinding strings in a row
Hi all,
I have a data.frame I received with data that look like this (comma
separated strings in last row):
ID Shop Items
ID1 A1 item1, item2, item3
ID2 A2 item4, item5
ID3 A1 item1, item3, item4
But I would like to unbind the strings in col(2) items so that it will look
like this:
ID Shop Items
ID1 A1 item1
ID1 A1 item2
ID1 A1 item3
ID2 A2 item4
ID2 A2 item5
ID3 A1 item1
ID3 A1 item3
ID3 A1
2009 Mar 07
4
merge data frames with same column names of different lengths and missing values
Hello, I'm switching over from SAS to R and am having trouble merging data frames. The data frames have several columns with the same name, and each has a different number of rows. Some of the values are missing from cells with the same column names in each data frame. I had hoped that when I merged the dataframes, every column with the same name would be merged, with the value in a complete
2007 Dec 07
1
Ruby on Rails applications with Mongrel cluster
Hello All
I am trying to install 5 mongrel servers against my app. i am using
Vista. I found this article on a website.. but am stuck on one point.
here are some notes from article:
Now enable the needed modules (url rewriting, proxy, proxy_balancer e
proxy_http) by editing the httpd.conf file (under c:
\Apache_Software_Foundation\Apache2.2\conf, if you installed Apache in
its standard path).
2009 Oct 13
0
tm: Why does adding local metadata take so long?
I'm running tm 0.5 on R 2.9.2 on a MacBook Pro 17" unibody early 2009
2.93 GHz 4GB RAM. I have a directory with 1697 plain text files on
the Mac, that I want to analyze with the tm package. I have read the
documents into a corpus, Corpus_3compounds, as follows:
# Assign directory to a character vector
dirName <- "/Volumes/RDR Test Documents/3Compounds/TXT"
# Put the
2011 Aug 21
1
rank analysis - reinventing the wheel?
Hello,
I have two data frames. One is my dependent variable and the other is my
independent variable. For each row I'd like to split the independent
variable into fractiles (25 or more) and calculate the average value of the
dependent variable. Then I would like to plot the average of the averages
for each row for each fractile. If possible, I'd like to have the option to
1) define the