similar to: spliting first 10 words in a string

Displaying 20 results from an estimated 600 matches similar to: "spliting first 10 words in a string"

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 May 02
3
subseting data
Hi, Is it possible (i am sure it is) to subset data from a data.frame on the basis of SQL >LIKE< operator. I.e., i would like to subset a data where only values which contains a string >GP< would be used? Example: Gp<-subset(DF, DF$USCS like >GP<) This like of course is not working, Thanks, m [[alternative HTML version deleted]]
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 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 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
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
2010 Nov 02
2
count different words in a field
Hi all, I started to ask this in the other post, but it is off topis...so here it is again. I have a data.frame (created with the helpof this mail list) that looks like this : 'data.frame': 22801 obs. of 15 variables: $ V1 : chr "HUMUS" "SLABO" "MALO" "SLABO" ... $ V2 : chr "IN" "GRANULIRAN"
2010 Oct 13
4
loop
Dear all, I am trying to run a loop in my codes, but the software returns an error: "subscript out of bounds" I dont understand exactly why this is happenning. My codes are the following: rm(list=ls()) #remove almost everything in the memory set.seed(180185) nsim <- 10 mresultx <- matrix(-99, nrow=1000, ncol=nsim) mresultb <- matrix(-99, nrow=1000, ncol=nsim) N
2010 Nov 03
1
deleteing all but some observations in data.frame
Hi, I am sure that can be done in R.... How would i delete all but let say 20 observations in data.frame? Thank you, M [[alternative HTML version deleted]]
2011 May 21
1
DocumentTermMatrix error
Hi all, I have tried to create a DocumentTermMatrix with a tm package, but i get this error : Error in tolower(txt) : invalid input 'PROD Z LAHKO GNETNO MELJNO GLINO, ... in 'utf8towcs' I tried doing this as it is showed in : http://www.r-project.org/doc/Rnews/Rnews_2008-2.pdf (An Introduction to Text Mining), with this R code :
2010 Oct 14
6
for loop
Dear all, I have a function f(x) which return a list as result. $T1 [1] 0.03376190 $T2 [1] 0.04725 $T3 [1] 0.3796071 $T4 [1] 0.3713452 $T5 [1] 0.4523651 $T6 [1] 0.4575873 I now find the result for a vector of x values at one time. I want to store the reuslt for each xi value in a column of a matrix x <- seq(0,1, by=0.1) result <- matrix(0, nrow=6, ncol=length(x)) for (i in
2023 Dec 01
1
back tick names with predict function
Also, and possibly more constructively, when you get an error like > CI.c = predict(mod2, data.frame( `plant-density` = x), interval = 'c') # fail Error in eval(predvars, data, env) : object 'plant-density' not found you should check your assumptions. Does "newdata" actually contain a columnn called "plant-density": > head(data.frame( `plant-density`
2006 Apr 17
1
strsplit does not return correct value when spliting "" (PR#8777)
Full_Name: Charles Dupont Version: 2.2.0 OS: linux Submission from: (NULL) (160.129.129.136) when strsplit("", " ") returns character(0) where as strsplit("a", " ") returns "a". these return values are not constiant with each other. Charles Dupont
2006 Apr 17
0
(PR#8777) strsplit does [not] return correct value when spliting ""
Prof Brian Ripley wrote: > On Mon, 17 Apr 2006, Charles Dupont wrote: [...] > > The man page states in the value section that strsplit returns: > > A list of length 'length(x)' the 'i'-th element of which contains > > the vector of splits of 'x[i]'. > > > > It mentions no change in behavior if the value of x[i] = "". >
2006 Jul 28
1
spliting
Dear mailing list, I have a big data frame and each element in the matrix has two alphabets. I want to split those alphabets into two so each element will have one alphabet and the number of my columns will be doubled . So can some one help with the code? Example of what I want is to split them. Input (three column) GG AG AG CC CC CC CC CC CC AG
2008 Jul 17
2
spliting a string
Hi String<-"130.5" Df<-Strsplit(".",":",String) Then Df get "" "" "" "" But I want Df should contains Df "130" "5" If any body knows how to do it.tel me Thanks K.Ravichandra [[alternative HTML version deleted]]
2007 Nov 28
1
how to find and use specific column after spliting dataframe
Dear all: I am a new R-user and I have 2 questions about it. 1) I need to find specific sub-dataframe, and then use specific column to calculate. For example, after splitting dataframe, I find specific the sub-dataframe, such as ?A.split [1]?. But, I don?t know how to find ?time? and ?concentration? columns of ?A.split [1]?. 2) The equation used to sub-dataframe is
2009 Dec 17
2
Problem with spliting a dataframe values
Hi all, Hi this is kiran I am facing a problem to split a dataframe that is.. i have a string like: "a,b,c|1,2,3|4,5,6|7,8,8" first I have to split with respect to "|" I did it with command unlist(strsplit("a,b,c|1,2,3|4,5,6|7,8,8", "\\,")) after getting that set i made it as a dataframe and it comes like a,b,c 1,2,3 4,5,6 7,8,8 now i have to
2005 Oct 20
5
spliting an integer
Hi there, From the vector X of integers, X = c(11999, 122000, 81997) I would like to make these two vectors: Z= c(1999, 2000, 1997) Y =c(1 , 12 , 8) That is, each entry of vector Z receives the four last digits of each entry of X, and Y receives "the rest". Any suggestions? Thanks in advance, Dimitri [[alternative HTML version deleted]]
2006 Sep 20
3
Spliting a huge vector
Dear R users, I have a huge vector that I would like to split into unequal slices. However, the only way I can do this is to create another huge vector to define the groups that are used to split the original vector, e.g. # my vector is this a.vector <- seq(2, by=5, length=100) # indices where I would like to slice my vector cut.values <- c(30, 50, 100, 109, 300, 601, 803) # so I have to