[R] Comparing data

2011-11-28 Thread Matevž Pavlič
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

Re: [R] Multiple R linear models into one Latex table

2011-08-22 Thread Matevž Pavlič
Hi, thanks for the help. Class says as follows : class(DF) [1] SpatialPointsDataFrame attr(,package) [1] sp class(grd) [1] SpatialPixels attr(,package) [1] sp Anyway, the problem was, as Rmh suggested, with the zerodist(). Tnx, m -Original Message- From:

Re: [R] Multiple R linear models into one Latex table

2011-08-22 Thread Matevž Pavlič
Sorry wrong thread ;) m -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Matevž Pavlič Sent: Monday, August 22, 2011 12:14 PM To: Rmh; Alex Ruiz Euler Cc: r-help@r-project.org Subject: Re: [R] Multiple R linear models into one

[R] adding text to spplot

2011-07-13 Thread Matevž Pavlič
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 =

Re: [R] adding text to spplot

2011-07-13 Thread Matevž Pavlič
-Original Message- From: Weidong Gu [mailto:anopheles...@gmail.com] Sent: Wednesday, July 13, 2011 4:03 PM To: Matevž Pavlič Cc: r-help@r-project.org; r-sig-...@r-project.org Subject: Re: [R] adding text to spplot You may need panel function spplot(enaD2, var1.pred,sp.layout=pts, main = globina 60 cm

Re: [R] text mining

2011-05-26 Thread Matevž Pavlič
HI, I do it like this : setwd(C:/Users/mpavlic/Desktop/Temp) library(tm) tekst - Corpus(DirSource(.),readerControl = list(language =ansi)) where *.txt files are stored in a folder Temp in my desktop, HTH, m -Original Message- From: r-help-boun...@r-project.org

[R] tm package, makeChunks

2011-05-22 Thread Matevž Pavlič
Hi all, i have a question about a makeChunks function from tm package. I have a text with constructed with a SQL qurey consisting of several rows in a table. The texts should be around 1000 lines but is now one long line of text. My question is : Does this matter in makeChunks()

[R] DocumentTermMatrix error

2011-05-21 Thread Matevž Pavlič
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

Re: [R] DocumentTermMatrix error

2011-05-21 Thread Matevž Pavlič
Got it...the problem was with Slovenian characters. Once i replaced them with normal characters it works fine. Tnx anyway, m -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Matevž Pavlič Sent: Saturday, May 21, 2011 1:27 PM To: r

Re: [R] Help using tm text mining package - preprocessing

2011-05-21 Thread Matevž Pavlič
Got it...the problem was with Slovenian characters. Once i replaced them with normal characters it works fine. Tnx anyway, m -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of mpavlic Sent: Saturday, May 21, 2011 1:06 PM To:

[R] DocumentTermMatrix - text minig

2011-05-20 Thread Matevž Pavlič
Hi All, I have a Data.frame that looks like that one below. I would like to do some text mining on it to possibly find some patterns between Opis, ACklasifikacija and Vodja. I looked over a tm package which loks promissing, more specifically DocumentTermMatrix or TermDocumentMatrix. But I

[R] DocumentTermMatrix - text minig

2011-05-20 Thread Matevž Pavlič
Hi All, I have a Data.frame that looks like that one below. I would like to do some text mining on it to possibly find some patterns between Opis, ACklasifikacija and Vodja. I looked over a tm package which loks promissing, more specifically DocumentTermMatrix or TermDocumentMatrix. But I

[R] deiversity / density

2011-05-12 Thread Matevž Pavlič
Hi all, I have a point data set (SHP) with coordinates and a attribute (i.e. type of point). These points are scattered around a fairly big area. What i would like to do is to find a sub-area where density of points sombined with the diversity of type is the biggest. Does

[R] scatter plot with Z value

2011-05-04 Thread Matevž Pavlič
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

[R] subseting data

2011-05-02 Thread Matevž Pavlič
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,

Re: [R] subseting data

2011-05-02 Thread Matevž Pavlič
Hi, When I use your code i get this : dat-data.frame(test=c(abc,cdf,dabc)) d-subset(dat,grepl(test,abc)) d Warning message: In grepl(test, abc) : argument 'pattern' has length 1 and only the first element will be used d test 1 abc 2 cdf 3 dabc I can't seem to make it

Re: [R] QQ plot for normality testing

2011-05-01 Thread Matevž Pavlič
, 2011 8:04 PM To: Matevž Pavlič Cc: r-help@r-project.org Subject: Re: [R] QQ plot for normality testing Hi, qqnorm basically plots your actual sample values against what the values would be (approximately) if they were from a normal distribution. qqline() adds a line through the 1st and 3rd

[R] QQ plot for normality testing

2011-04-30 Thread Matevž Pavlič
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

[R] Zerodist

2010-11-20 Thread Matevž Pavlič
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

Re: [R] Zerodist

2010-11-20 Thread Matevž Pavlič
Hi, It's just that i have few points with the same coordinates and i would like to get riid of the duplicates so that Kriging would work. Thanks, m __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] multiple regression analysis

2010-11-07 Thread Matevž Pavlič
Hi all, This is more a help on ideas that on actuall R code. Those of you which are geologist or work with boreholes woudl understand that i would like to achieve. I'll tr to explain as good as I can...so here it goes.. I have around 1000 geomechanical (geological) borehole logs in

Re: [R] Loop

2010-11-05 Thread Matevž Pavlič
Hi Jim an Petr, Both of your solutions do what i want. Thanks for the help, Regards, m -Original Message- From: Petr PIKAL [mailto:petr.pi...@precheza.cz] Sent: Friday, November 05, 2010 6:49 AM To: Matevž Pavlič Cc: jim holtman; r-help@r-project.org Subject: RE: [R] Loop Hi

Re: [R] Loop

2010-11-04 Thread Matevž Pavlič
-Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Wednesday, November 03, 2010 10:41 PM To: Matevž Pavlič Cc: r-help@r-project.org Subject: Re: [R] Loop On Nov 3, 2010, at 5:03 PM, Matevž Pavlič wrote: Hi, Thanks for the help and the manuals. Will come very

Re: [R] Loop

2010-11-04 Thread Matevž Pavlič
PIKAL [mailto:petr.pi...@precheza.cz] Sent: Thursday, November 04, 2010 3:40 PM To: Matevž Pavlič Cc: r-help@r-project.org Subject: Re: [R] Loop Hi r-help-boun...@r-project.org napsal dne 04.11.2010 14:21:38: Hi David, I am still having troubles with that loop ... This code gives me (kinda

Re: [R] Loop

2010-11-04 Thread Matevž Pavlič
... . . . Hope that explains it and thanks for help, m . str(w) -Original Message- From: Petr PIKAL [mailto:petr.pi...@precheza.cz] Sent: Thursday, November 04, 2010 4:56 PM To: Matevž Pavlič Cc: r-help@r-project.org Subject: Re: [R] Loop Hi r-help-boun...@r-project.org napsal dne

Re: [R] Loop

2010-11-04 Thread Matevž Pavlič
To: Matevž Pavlič Cc: Petr PIKAL; r-help@r-project.org Subject: Re: [R] Loop Is this closer to what you want, assuming that it is the value of the most frequently occurring: apply(mat, 2, function(x) head(names(sort(table(x), decreasing=T)),5)) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10

Re: [R] spliting first 10 words in a string

2010-11-03 Thread Matevž Pavlič
Hi all, Thanks for all the help. I realize i have a lot to learn in R but i love it. m From: steven mosher [mailto:mosherste...@gmail.com] Sent: Tuesday, November 02, 2010 11:45 PM To: Matevž Pavlič Cc: David Winsemius; Gaj Vidmar; r-h...@stat.math.ethz.ch Subject: Re: [R] spliting

[R] deleteing all but some observations in data.frame

2010-11-03 Thread Matevž Pavlič
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]] __ R-help@r-project.org mailing list

[R] Loop

2010-11-03 Thread Matevž Pavlič
Hi all, I managed to do what i want (with the great help of thi mailing list) manually . Now i would like to automate it. I would probably need a for loop for to help me with this...but of course I have no idea how to do that in R. Bellow is the code that i would like to be replicated

Re: [R] Loop

2010-11-03 Thread Matevž Pavlič
, November 03, 2010 9:30 PM To: Matevž Pavlič Subject: Re: [R] Loop If I understand properly, you'll want something like: lit[[w2]] instead of lit$w2 more accurately: for(i in 1:20) { vari - paste(w, i) lit[[vari]] ... } The two documents mentioned in my signature may help you. On 03/11/2010

Re: [R] spliting first 10 words in a string

2010-11-02 Thread Matevž Pavlič
Hi all, Thanks for all the help. I managed to do it with what Gaj suggested (Excel :(). The last solution from David is also freat i just don't undestand why R put the words in 14 columns and thre rows? I would like it to put just the first 10 words in source field to 10 diefferent

Re: [R] spliting first 10 words in a string

2010-11-02 Thread Matevž Pavlič
, m -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Tuesday, November 02, 2010 8:23 PM To: Matevž Pavlič Cc: Gaj Vidmar; r-h...@stat.math.ethz.ch Subject: Re: [R] spliting first 10 words in a string On Nov 2, 2010, at 3:01 PM, Matevž Pavlič wrote: Hi all

Re: [R] splitting First 10 words in a string

2010-11-02 Thread Matevž Pavlič
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)

[R] count different words in a field

2010-11-02 Thread Matevž Pavlič
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

Re: [R] count different words in a field

2010-11-02 Thread Matevž Pavlič
Nevermind, i think summary() does this ... -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Matevž Pavlič Sent: Tuesday, November 02, 2010 10:12 PM To: r-help@r-project.org Subject: [R] count different words in a field Hi all

[R] spliting first 10 words in a string

2010-11-01 Thread Matevž Pavlič
Hi all, I have a columnn with text that has quite a few words in it. I would like to split these words in separate columns, but just first ten words in the string. Is that possible in R? Thank you, m [[alternative HTML version deleted]]

Re: [R] spliting first 10 words in a string

2010-11-01 Thread Matevž Pavlič
, 2010 10:13 PM To: Matevž Pavlič Cc: r-help@r-project.org Subject: Re: [R] spliting first 10 words in a string On Nov 1, 2010, at 4:39 PM, Matevž Pavlič wrote: Hi all, I have a columnn with text that has quite a few words in it. I would like to split these words in separate columns, but just

Re: [R] spliting first 10 words in a string

2010-11-01 Thread Matevž Pavlič
with; $ Column6 : factor ten; $ Column7: factorwords Hope that explains it better, I am still having some troubles understanding R and all.. m -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Matevž Pavlič Sent: Monday, November 01

Re: [R] for loop

2010-10-31 Thread Matevž Pavlič
Hi Dennis, Thank you for your extensive explanations. Yes, I guess I did not explain what I would like to do. Basically I would like to conduct a linear regression for each of 15 classes. Your answers gave me new Perspective on how R works. Thanks again for the help, m From:

[R] for loop

2010-10-30 Thread Matevž Pavlič
Hi, I know this is probalby a very trivial thing to do for most of the R users, but since I just strated using it I have some problems I have a data.frame with a field called razred. This field has values from 1 up to 15. Is it possible to create a for loop that would create a new

Re: [R] for loop

2010-10-30 Thread Matevž Pavlič
, 2010 8:24 PM To: Matevž Pavlič Cc: r-help@r-project.org Subject: Re: [R] for loop On Oct 30, 2010, at 2:07 PM, Matevž Pavlič wrote: Hi, I know this is probalby a very trivial thing to do for most of the R users, but since I just strated using it I have some problems I have a data.frame

[R] chfactor.c, line 130 ERROR

2010-10-26 Thread Matevž Pavlič
Hi all, I have a problem with this code... as it generates an error in R. z-predict(dat.fit, newdata=grd) I saw a post on R forum about this [chfactor.c, line 130: singular matrix in function LDLfactor() ] error and tried pretty much anything I could read about it and still haven