Displaying 20 results from an estimated 8000 matches similar to: "time plot"
2012 Jul 07
11
Splitting a character vector.
I am lousy at simple regex and I have not found a solution to a simple problem.
I have a vector with some character values that I want to split.
Sample data
dd1 <- c( "XXY (mat harry)","XXY (jim bob)", "CAMP (joe blow)", "ALP (max jack)")
Desired result
dd2 <- data.frame( xx = c("XXY", "XXY", "CAMP",
2009 May 08
2
Probit cluster-robust standard errors
If I wanted to fit a logit model and account for clustering of observations, I would do something like:
library(Design)
f <- lrm(Y1 ~ X1 + X2, x=TRUE, y=TRUE, data=d)
g <- robcov(f, d$st.year)
What would I do if I wanted to do the same thing with a probit model?
?robcov says the input model must come from the Design package, but the Design package appears not to do probit?
Thanks very
2012 Aug 08
3
decimal points midline
Hi, does anyone know how to make decimal points midline when plotting? The journal to which we are going to submit a manuscript require this particular formatting, and it gives direction how to do this on PC: hold down ALT key and type 0183 on the number pad
Thanks
John
[[alternative HTML version deleted]]
2013 Mar 21
2
Excuse me
Dear R software faculty:
There is a question bothering me. That is why we can not set the property of row.names=false when we output csv data. But there exists that parameter in R help. Hoping for your reply!
Best regards!
Li Nan
[[alternative HTML version deleted]]
2012 Sep 26
2
Retrieve regression summary results after rq
Hi all,
I am using quantile regression with svy design. I want to retrieve
summary regression statistics (std error, p-value), since I don't have
any in my output:
Commands:
clus1_d<- svydesign(id=~cd002_co, weights=~wtper, strata=~str, data=data)
bclus1<-as.svrepdesign(clus1_d,type="bootstrap",replicates=100)
fit1<-
2013 Apr 03
7
Canadian politcal party colours in ggplot2
A stupid question but does anyone know how to express the actual colours used by the main Canadian political parties? I want to do a couple of ggplot2 plots and have lines or rectangles that accurately reflect the party colours.
I can probably play around with RColorBrewer or something to figure it out but if some some already has got them it would save me some time especially with the NDP
2012 Mar 18
2
word frequency count
Hi:
I have a dataframe containing comma seperated group of words such as
milk,bread
bread,butter
beer,diaper
beer,diaper
milk,bread
beer,diaper
I want to output the frequency of occurrence of comma separated words
for each row and collapse duplicate rows, to make the output as shown
in the following dataframe:
milk,bread 2
bread,butter 1
beer,diaper 3
milk,bread 2
Thanks for help!
deb
2012 Jul 23
3
How to do the same thing for all levels of a column?
Dear all,
I am a R beginner, and I am looking for a way to do the same thing for all
levels of a column in a table.
Basically, I have a bunch of protein sequences composed of different amino
acid residues, and each residue is represented by an uppercase letter. I
want to calculate the ratio of different amino acid residues at each
position of the proteins. Here is an example table:
Proteins
2013 Oct 04
3
quote a column of a dataframe by its name
Dear All,
I have a question, suppose X is a dataframe, with column names as
"x1", "x2", "x3", ..... And I would like to use the i-th column by X[,'xi'].
But it seems the single quote and double quote are different.
So if I run X[, names(X)[i]], it has some error.
Please use the below example code
X = matrix(rnorm(50),ncol = 5)
X = data.frame(X)
2013 Jul 10
3
PCA and gglot2
Hi,
I was trying as well as looking for an answer without success (a bit strange
since it should be an easy problem) and therefore I will appreciate you
help:
My simple script is:
# Loadings data of 5 columns and 100 rows of data
data1<-read.csv("C:/?/MyPCA.csv")
pairs(data1[,1:4])
pca1 <- princomp(data1[,1:4], score=TRUE, cor=TRUE)
biplot(pca1)
The biplot present the data
2013 Feb 14
2
Plot a Matrix as an Image with ggplot
Dear all,
I am trying to plot a matrix I have? as an image
str(matrixToPlot)
?num [1:21, 1:66] 0 0 0 0 0 0 0 0 0 0 .
?that contains only 0s and 1s,
where the xlabel will be Labeled as
str(xLabel)
?num [1:66] 1e+09 1e+09 1e+09 1e+09 1e+09 ...
and the yLabels will be labeled as
str(yLabel)
?num [1:21] -88 -87 -86 -85 -84 -83 -82 -81 -80 -79 ...
I have found on the internet that I can do
2012 Feb 29
1
ggplot2 dot chart-start at zero
I am trying to create a simple dot-plot in ggplot2 with a solid line from the y-axis to the dot, something I first saw in Cleveland's 1984 book
What I would like is to have the graph start at zero on the x-axis but leave some space on the right side of the plot area.
I assumed that I should be able to do this with expand() in scale_x_continuous() but either I'm wrong or just don't
2012 Mar 08
6
how to modify the tickment of x-axis
hi
I plot a series of observation data every minutes in a day as the
attachment below
plot(wnd,type='l',lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY)
In the figure, the x-axis tickment is the number of data How can I change
it
fore example 1h 2h 3h 4h and so on ?
--
TANG Jie
Email: totangjie at gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China
2013 Aug 27
6
Scale of axis for two data sets
Hi,
Kbytes RSS rNo
2689632 1450876 1433788
2689632 1450876 1433788
2689632 1450876 1433788
2689632 1450876 1433788
2689632 1450876 1433788
2689632 1450876 1433788
2689632 1450876 1433788
2689632 1460168 1443084
plot(data$rNo,data$RSS,pch=0,type="b",col=36,axes=FALSE, ylab="",
xlab="",las=2,lwd=2.5)
title(" PID -
2012 Sep 12
2
help server slow
suddenly a few days ago it takes about a minute for local help to come up .
i type :
?hist
and get
starting httpd help server ... done
but only after a minute does
http://127.0.0.1:15686/library/graphics/html/hist.html
appear .
Lee De Cola, PhD, MCP.
DATA to Insight
LDECOLA@COMCAST.NET
Reston, Virginia
703 709 6972
571 315 0577 mobile
[[alternative HTML version deleted]]
2013 Mar 21
1
Compatibility problem Iramuteq / R : help !!!
Hi,
I try to run the Iramuteq software with R, on Windows 7 professional
(latest version of Iramuteq, and I tried with the three latest versions of
R). I properly installed the packages and coded the texts, but anytime I
want to run the analysis, I receive this error message : Erreur R None1
None None. Could someone help me to deal with that problem ? Thank you !!!
Arthur Borriello
PhD student -
2012 Sep 18
1
extracting values
Hi all,
I 'm doing the exercise given in the 'SDM with R' (Robert J. Hijmans and Jane Elith), chapter 4.2, regarding extracting values . I tried to do the same using my own data as well. Each cases i received the following error message ;
"Error in .xyValues(x, as.matrix(y), ...) : xy should have 2 columns only.
Found these dimensions:
Can some body explain me how to get rid
2012 Sep 25
1
geom_line: How to plot two data sets having different maximum X-axis values in a single plot?
Hello, I just started to learn R and ggplot2. Can someone help?
How to plot two data sets having different maximum X-axis values in a
single plot?
For example, I have two data sets showed below. Using position as X, and
count as Y, how can I plot them out in different color lines within a
single plot using ggplot2 geom_line?
dataset a:
position count
1 3
2 9
3 10
4 15
5
2012 Jul 04
1
How do you impute missing data using Latent Class Model (poLCA package)
My problem is I have data with both categorial and numerical data,
currently only the categorical number contains missing data, was wondering
do I make a new dataframe containing only the categorical columns?
How would you use Latent Class Model specifically poLCA to impute the
missing data?
http://www.sscnet.ucla.edu/polisci/faculty/lewis/pdf/poLCA-JSS-final.pdf
The reason why I chose not to
2012 Aug 08
1
ggplot2 with separate average lines
Hi I'm just starting off with R but is this correct?
I have this data set.
> data
Type ID Size
1 Reqd 244808 1024
2 Reqd 244045 512
3 Reqd 245427 800
4 Reqd 245423 1024
5 Reqd 244983 1024
6 Used 244808 615
7 Used 244045 33
8 Used 245427 261
9 Used 245423 461
10 Used 244983 1194
I want a scatterplot of the Size values grouped by the Type column.
I also want 2 lines