similar to: Splitting a character vector.

Displaying 20 results from an estimated 7000 matches similar to: "Splitting a character vector."

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 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 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 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)
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 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 -
2013 May 24
2
xtable() with booktabs option problem
I could have sworn that yesterday xtable(file, booktabs = TRUE) was giving me toprule , midrule and bottomrule outout. Today : library(xtable) aa <- table( sample(letters[1:9], 100, replace = TRUE)) xtable(aa, booktabs = TRUE) gives me \begin{table}[ht] \centering \begin{tabular}{rr} \hline & V1 \\ \hline a & 15 \\ b & 11 \\ c & 13 \\ d &
2012 Oct 04
2
t-test
Dear Group, I want to do a t-test calculation on a large data set. I am pasting some part of it structure(list(Name = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("CTK100", "CTK103", "CTK121"), class = "factor"), Score = c(236.9726, 207.0055, 237.3464, 224.4774, 236.5034,
2012 Aug 04
2
ggplot2 boxplot help
Hello, I have a data set that looks like this: name G-ID test_id g-id g 1 00077464 C_068131 C_068131 OC_068131 - 2 00051728 C_044461 C_044461 OC_044461 - 3 00058738 C_050343 C_050343 OC_050343 - 4 00059239 C_050649 C_050649 OC_050649 - 5 00001761 C_000909 C_000909 OC_000909 - 6 00005119 C_002752 C_002752 OC_002752 - locs
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 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
2012 Jul 23
2
Creating panel data
I'm new to R. I am trying to create panel data with a slight alteration from a typical dataset. At present, I have data on a few hundred people with the dates of occurrences for several events (like marriage and employment). The dates are in year/quarter format, so 68.0 equals the 1st quarter of 1968 and 68.25 equals the 2nd quarter of 1968. If the event never occurred,
2012 Oct 02
5
smoothScatter plot
Hi, I want to make a plot similar to sm1 (attached). The code I tried is: dcols <- densCols(x,y) smoothScatter(x,y, col = dcols, pch=20,xlab="A",ylab="B") abline(h=0, col="red") But it turned out to be s1 (attached) with big dots. I was wondering if anything wrong with my code. Thanks,Zhengyu -------------- next part -------------- A non-text
2012 Sep 15
2
qplot: plotting precipitation data
Dear list, I wish to plot chromatin precipitation data: I would like to have a rectangles (x:end-start, y:peak) but I do not have an idea how to define x (in terms of qplot syntax) and to choose the correct geom. mydata is a subset of a larger file. > mydata chrom start end peak 1 chr11 5291000 5291926 8 2 chr11 10988025 10988526 7 3 chr11 11767950 11768676 8 4
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:
2013 Sep 24
1
request for help in R
respectd sir,  i am working on regional frequency analysis of flood flow data and want to use packages lmomRFA, lmom, imomco,etc andby using these i want to find RMSE , errorbounds and absolute biase but could not make it clear to use, please help regards atta muhammad asif assistant professor atta_ycc@yahoo.com [[alternative HTML version deleted]]
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
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