similar to: subseting data

Displaying 20 results from an estimated 1000 matches similar to: "subseting data"

2010 Nov 02
1
splitting First 10 words in a string
Hi Steven, Thank you for the help. I get an error though when i do this : >lit<-read.csv("litologija.csv", sep=";", dec=".") >sent <-data.frame(sentence=lit$Opis,stringsAsFactors=FALSE) >str(sent) >sentV<-rep(sent,10) >str(sentV) >first=second=third=fourth=fifth=sixth=seventh=eighth=ninth=tenth<-vector(length=10) >DF
2011 Apr 30
4
QQ plot for normality testing
Hi all, I am trying to test wheater the distribution of my samples is normal with QQ plot. I have a values of water content in clays in around few hundred samples. Is the code : qqnorm(w) #w being water content qqline(w) sufficient? How do I know when I get the plots which distribution is normal and which is not? Thanks, m [[alternative HTML version
2011 Jul 13
3
adding text to spplot
hi all, I have a plot to which i would like to add text labels. And i cant find a way...here is the code : enaD2<-idw(D2~1, loca=dva, newdata=grd) pts = list("sp.points", dva, pch = 20, cex=1.5, col = "darkred spplot(enaD2, "var1.pred",sp.layout=pts, main = "globina 60 cm", sub="D2",
2011 May 04
1
scatter plot with Z value
Hi all, I would like to create a scatter plot of two variables (y, x) whith third value (z) written on the plot? After that i would like to add a line (Y=0.7*(x-20)) to the graph. I tried plot(x~y) but there is no command for the third vairable to be shown on the graph also i can't find a way to add a Y=x*(0.7-20) to the chart. Thanks, m [[alternative HTML version
2010 Nov 20
1
Zerodist
Hi all, I got the >"chfactor.c", line 130: singular matrix in function LDLfactor() Error in predict.gstat(g, newdata = newdata, block = block, nsim = nsim, : LDLfactor< Error, probably because there are some point pairs with zero distance in the matrix. My question is, how can i delete these duplicate nodes from the data set? Thanks, m [[alternative
2013 Feb 16
7
Passing R code from webpage
Hi all, Is there a way to pass R code from web page (html file) to do some statistics and than plot the output in web browser. I am looking forever at this, and cant find a way. Regards,m -- View this message in context: http://r.789695.n4.nabble.com/Passing-R-code-from-webpage-tp4658800.html Sent from the R devel mailing list archive at Nabble.com.
2011 Nov 28
1
Comparing data
Hi all, i have a data set cintaining 14 columns and 11 rows. Rows represent single point and columns represent the parameter measured. I wiuld like to compare the data to see which are more alike. I used the cluster analysis, but now i ma wondering if there are some other methods, since the cluster analysis did not give me the result i like. I tried to use factanal() for factor analysis
2016 Apr 24
1
assign color to subsets
'grepl' returns a logical vector; you have to use this to get your subset. You can use: df_tq <- subset(df, grepl("t1", Command)) df_t2 <- subset(df, grepl("t2", Command)) # if you want to also get a subset that has both, use df_both <- subset(df, grepl("t1", Command) & grepl("t2", Command)) Jim Holtman Data Munger Guru What is
2016 Apr 24
0
assign color to subsets
now after this: df_both <- subset(df, grepl("t1", Command) & grepl("t2", Command)) I use factor to apply the subset to df but then the Command level becomes 0 df_both$Command=factor(df_both$Command) str(df_both) $ Protocol : Factor w/ 0 levels: Do you know what is the reason? Thanks for replying On Sunday, April 24, 2016 12:18 PM, jim
2016 Apr 30
3
how to use AND in grepl
Hi all, I have one factor variable in my df and I want to extract the names from it which contain both "t2" and "pd": 'data.frame': 36919 obs. of 162 variables $TE :int 38,41,11,52,48,75,..... $TR :int 100,210,548,546,..... $Command :factor W/2229 levels
2010 Oct 08
2
Memory management in R
Dear All, I am experiencing some problems with a script of mine. It crashes with this message Error in grepl(fut_string, past_string) : invalid regular expression
2009 Nov 23
4
Check if string has all alphabets or numbers
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091123/470946bc/attachment-0001.pl>
2011 Jun 09
2
scatterplot3d - help assign colors based on multiple conditions
Hi I am relatively new to R and am trying to figure out to plot 3d scatter plot using defined colors based on x-axis and y-axis values. Right now in the code below, I assign colors based on certain values in the names of the x-axis. Now if I want to extend the condition to assign a color based on the names of both x-axis and y-axis values, what should I be doing? Any help or ideas would be
2019 Aug 09
3
Underscores in package names
I do not follow you Gabriel. Package name must not use digit numbers. Tarbal will use them, taken from the DESCRIPTION file, version field. That's why I consider the weird case name you presented as irrelevant, and not to be considered. Le ven. 9 ao?t 2019 ? 20:41, Gabriel Becker <gabembecker at gmail.com> a ?crit : > > > On Fri, Aug 9, 2019 at 11:05 AM neonira Arinoem
2023 May 30
3
why does [A-Z] include 'T' in an Estonian locale?
Inspired by this old Stack Overflow question https://stackoverflow.com/questions/19765610/when-does-locale-affect-rs-regular-expressions I was wondering why this is TRUE: Sys.setlocale("LC_ALL", "et_EE") grepl("[A-Z]", "T") TRE's documentation at <https://laurikari.net/tre/documentation/regex-syntax/> says that a range "is shorthand for
2023 Jan 14
2
Removing variables from data frame with a wile card
Thanks to all. Very helpful. Steven from iPhone > On Jan 14, 2023, at 3:08 PM, Andrew Simmons <akwsimmo at gmail.com> wrote: > > ?You'll want to use grep() or grepl(). By default, grep() uses extended > regular expressions to find matches, but you can also use perl regular > expressions and globbing (after converting to a regular expression). > For example: >
2012 Feb 14
3
Wildcard for indexing?
Hi, I'd like to know if it is possible to use wildcards * for indexing... E.g. I have a vector of strings. Now I'd like to select all elements which start with A_*? I'd also need to combine that with logical operators: "Select all elements of a vector that start with A (A*) OR that start with B (B*)" Probably that is quite easy. I looked into grep() which I think might
2016 Apr 22
2
subset by multiple letters condition
Hi all, I have a data frame df and I want to do subset based on several conditions of letters of the names in Command.1)if the names contain PD 2)if the names contain t1 3)if the names contain t2 4)if the names contain t1 and PD 5)if the names contain t2 and PD 6)otherwise the names would be unknown. I don't know how to use grep for all these conditions. 'data.frame': 36919
2013 Feb 05
2
R Regular Expressions - Metacharacters
I thought that I can use metacharacters such as \w to match word characters with one backslash. But for some reason, I need to include two backslashes. > grepl(pattern='\w', x="what") Error: '\w' is an unrecognized escape in character string starting "\w" > grepl(pattern='\\w', x="what") [1] TRUE I can't find the reason for this
2016 Apr 28
2
Combinaciones sin repetición...con restricciones
Hola, Carlos. Primero, muchas gracias por el código. No es exactamente lo que quería, porque la parte "Detección de presencia de "cual_1" y "cual_2"... no excluye aquellas combinaciones en las que está presente también el objeto c, pero me ha servido de base e inspiración para elaborar otro código. He copiado la primera parte de tu función, para crear todas las