Re: [R] problem with D(COM) Server

2011-02-02 Thread Umesh
Benjamin, I do have the same issue, i tried all different combination as you did but I was not successful. If you have a solution to address this issue please let me know. Umesh -- View this message in context: http://r.789695.n4.nabble.com/problem-with-D-COM-Server-tp3006087p3256639.html Se

Re: [R] looping variable names

2011-02-02 Thread hypermonkey22
Thanks for the reply! This sounds great. Is there a nice way to store these 100 variable names in a list without typing them all out? -- View this message in context: http://r.789695.n4.nabble.com/looping-variable-names-tp3255711p3256356.html Sent from the R help mailing list archive at Nabble.

[R] Two packages with the same name in different projects at r-forge

2011-02-02 Thread Cristiano Strieder
Hi all, I have recently registered two projects at r-forge (let's say project A and B), in both I have a package called sads. The first project (A) was abandoned in fact. But install.packages("sads",repos="http://r-forge.r-project.org";) is returning the package from project A, when I want it from

[R] problem with parLapply from snow

2011-02-02 Thread Mark.Palmer
Hi, The following function use to work, but now it doesn't giving the error "> CallSnow(, 100) Using snow package, asking for 2 nodes 2 slaves are spawned successfully. 0 failed. Error in checkForRemoteErrors(val) : 2 nodes produced errors; first error: no applicable method for 'lapply

Re: [R] slightly off topic...

2011-02-02 Thread Claudia Beleites
The fact that the attachment to someone with a .de domain has them labeled mit de Wort "Teil" suggests that the labeling is being done at the final destination, since the server is set up with English messages. wie er scharfsinnig bemerkte[1] :-) Looking at the ASCII version of one such email

Re: [R] how to check if an attribute exists

2011-02-02 Thread Henrik Bengtsson
On Wed, Feb 2, 2011 at 7:25 PM, Peter Langfelder wrote: > On Wed, Feb 2, 2011 at 7:22 PM, Nick Matzke wrote: >> Oh wait, this basically does it: >> >>> if ("a" %in% attributes(z)$names) >> + print(TRUE) >> [1] TRUE >> >> (but there may be a better way) > > If z is a list, you can test > > is.null

Re: [R] how to check if an attribute exists

2011-02-02 Thread Peter Langfelder
On Wed, Feb 2, 2011 at 7:22 PM, Nick Matzke wrote: > Oh wait, this basically does it: > >> if ("a" %in% attributes(z)$names) > + print(TRUE) > [1] TRUE > > (but there may be a better way) If z is a list, you can test is.null(z$a) Peter __ R-help@r-pr

Re: [R] how to check if an attribute exists

2011-02-02 Thread Nick Matzke
Oh wait, this basically does it: > if ("a" %in% attributes(z)$names) + print(TRUE) [1] TRUE (but there may be a better way) Cheers! Nick On 2/2/11 7:20 PM, Nick Matzke wrote: I am dealing with an object that sometimes has a certain attribute, sometimes doesn't. How do I check for this? "exist

[R] how to check if an attribute exists

2011-02-02 Thread Nick Matzke
I am dealing with an object that sometimes has a certain attribute, sometimes doesn't. How do I check for this? "exists" doesn't work... === > z=c() > z$a = c("c", "d", "f") > z $a [1] "c" "d" "f" > exists("z") [1] TRUE > exists("z$a") [1] FALSE === .

Re: [R] Indexing from two variables

2011-02-02 Thread Sarah Goslee
That's kind of hard to follow without example data, but have you looked at merge() ? On Wed, Feb 2, 2011 at 1:31 PM, Ross Dunne wrote: > Hello, thank you all for your patience and time > > I am essentially trying to get disorganised data into long form for linear > modelling. > > I have 2 datafr

Re: [R] Select just numeric values from rows

2011-02-02 Thread Pete Brecknock
Terry Any good? list <-"A B C N1 N2 N3 N4 N5 N6 N7 N8 N9 N10 Apples Bananas Peaches 1 2 3 4 5 6 7 8 9 10 Oranges Kumquats Plums 1 1 3 5 5 5 7 6 6 12 Pears Kiwis Grapes 2 4 6 8 5 6 7 6 9 1" d = read.table(textConnection(list), header=TRUE) Nrowsums = apply(d[

Re: [R] testing randomness of random number generators with student t-test?

2011-02-02 Thread Dirk Eddelbuettel
On 2 February 2011 at 23:45, Barry Rowlingson wrote: | On Wed, Feb 2, 2011 at 11:01 PM, Carl Witthoft wrote: | > Hi, subject more or less says it all. | > | > I freely admit to not having bothered to find some of the online papers | > about method of testing the quality of random number generator

[R] Getting variable names in function output

2011-02-02 Thread Sébastien Bihorel
Dear R-users, I would like to have some advises about a problem illustrated by the following snippet. Within myf, I need to evaluate a piece of R code that is passed as a character argument and then return the objects that are created by this code. The difficulty comes from the fact that the conte

Re: [R] testing randomness of random number generators with student t-test?

2011-02-02 Thread Phil Spector
Carl - Under the null hypothesis, the distribution of p-values for any statistical test should be uniform over the range from 0 to 1. So while the individual p-values you see in an experiment like the one you carried out aren't really meaningful, their ensemble behaviour is. So if you did so

Re: [R] testing randomness of random number generators with student t-test?

2011-02-02 Thread Barry Rowlingson
On Wed, Feb 2, 2011 at 11:01 PM, Carl Witthoft wrote: > Hi, subject more or less says it all. > > I freely admit to not having bothered to find some of the online papers > about method of testing the quality of random number generators -- but in an > idle moment I wondered what to expect from some

Re: [R] set digits in xtable by row

2011-02-02 Thread Christian Raschke
Nevermind, I just read in the documentation that 'digits' can be a matrix. No idea how I could have overlooked this the first few times of reading it. I'm sorry for the noise. CR On Wed, 2011-02-02 at 16:40 -0600, Christian Raschke wrote: > Hello R-listers, > > I am using xtable to create so

[R] testing randomness of random number generators with student t-test?

2011-02-02 Thread Carl Witthoft
Hi, subject more or less says it all. I freely admit to not having bothered to find some of the online papers about method of testing the quality of random number generators -- but in an idle moment I wondered what to expect from something like the following: randa<-runif(1000) randb<-runif

Re: [R] Help with one of "those" apply functions

2011-02-02 Thread Robin Jeffries
Thanks Steve, I needed the alternative. tapply worked for my toy example, but it didn't for my real example. it might be b/c it was in a data frame, but i'm not sure. Using plyr did work however. Robin Jeffries MS, DrPH Candidate Department of Biostatistics UCLA 530-624-0428 On Wed, Feb 2, 20

Re: [R] unequally spaced factor levels orthogonal polynomial contrasts coefficients trend analysis

2011-02-02 Thread Greg Snow
If you know the spacing between the factor levels, then why not just treat it as a numeric vector and use the poly function to create orthogonal polynomials of the numeric variable. If you have an unequally spaced ordered factor that does not lend itself to the above, then I don't see that any

[R] set digits in xtable by row

2011-02-02 Thread Christian Raschke
Hello R-listers, I am using xtable to create some LaTeX tables for me to Sweave into my document. I am now trying to set the number of digits that will be reported in several _rows_ in my table. The 'digits' option in xtable() sets the number of digits to display for specified columns. Am I miss

Re: [R] unequally spaced factor levels orthogonal polynomial contrasts coefficients trend analysis

2011-02-02 Thread RICHARD M. HEIBERGER
polynomial contrasts with the scores argument should do what you want. ?contr.poly As an example: contr.poly(4, c(1,2,4,8)) diff(contr.poly(4, c(1,2,4,8))[,1]) On Wed, Feb 2, 2011 at 2:40 PM, Asan Ramzan wrote: > Hello [R]-help > > I am trying to find > > a package where you can do ANOVA b

Re: [R] A question about sampling

2011-02-02 Thread Greg Snow
The apply functions are really just hidden loops, and loops have been made efficient enough that they are usually not much slower (and sometimes a bit faster) than the apply's. If you really want to use apply, then look at mapply (might need to convert the matrix to a list), or you could use sa

Re: [R] looping variable names

2011-02-02 Thread Greg Snow
The best way to do this is to not create those variables in the global workspace, but to create a list with the variables in the list (you can name the list elements and access them by name or by number). With lists you can use lapply and sapply to do many of the things that you think you want

Re: [R] Help with one of "those" apply functions

2011-02-02 Thread Steve Lianoglou
Hi, On Wed, Feb 2, 2011 at 4:08 PM, Robin Jeffries wrote: > Hello there, > > I'm still struggling with the *apply commands. I have 5 people with id's > from 10 to 14. I have varying amounts (nrep) of repeated outcome (value) > measured on them. > > nrep <- 1:5 > id    <- rep(c("p1", "p2", "p3", "

Re: [R] Read a similarity matrix from excel

2011-02-02 Thread George Kakarontzas
Dear Petr, It worked fine. Thanks for helping. George -Original Message- From: Petr PIKAL [mailto:petr.pi...@precheza.cz] Sent: Wednesday, February 02, 2011 1:18 PM To: George Kakarontzas Cc: r-help@r-project.org Subject: Odp: [R] Read a similarity matrix from excel Hi r-help-boun...@

[R] A question about sampling

2011-02-02 Thread Patrick Boily
Greetings, I am attempting to do something with R that I think should be efficiently do-able, but I haven't yet found success. I have a vector of probability weights (for 17 categories), let's call it things (it could look like the one below, for instance). > things 0.026 0 0.233 0 0.131 0 0.4

[R] looping variable names

2011-02-02 Thread hypermonkey22
Hi all, I've been looking for a simple answer to the following problem. Let's say that I can loop through, say, 100 values that need to be assigned to, say, the variables var1:var100. Is there an elegant way to do this? I have seen one or two similar questions...but they tend to be in more com

[R] unequally spaced factor levels orthogonal polynomial contrasts coefficients trend analysis

2011-02-02 Thread Asan Ramzan
Hello [R]-help I am trying to find > a package where you can do ANOVA based trend analysis on grouped data > using orthogonal polynomial contrasts coefficients, for unequally > spaced factor levels. The closest hit I've had is from this web site: >(http://webcache.googleusercontent.com/search?q=ca

Re: [R] Help with one of "those" apply functions

2011-02-02 Thread Phil Spector
Robin - Does tapply(value,id,sum) do what you want? - Phil Spector Statistical Computing Facility Department of Statistics UC Berk

[R] Help with one of "those" apply functions

2011-02-02 Thread Robin Jeffries
Hello there, I'm still struggling with the *apply commands. I have 5 people with id's from 10 to 14. I have varying amounts (nrep) of repeated outcome (value) measured on them. nrep <- 1:5 id<- rep(c("p1", "p2", "p3", "p4", "p5"), nrep) value <- rnorm(length(id)) I want to create a new vecto

Re: [R] arranging pie charts in a matrix layout with row/col labels

2011-02-02 Thread Greg Snow
Yes, the better way to achieve this is to not use pie charts. Look at dotplots instead. Single pie charts are hard enough to read, multiple ones in the same plot will invite comparisons that at best are hard and are often wrong and misleading. -- Gregory (Greg) L. Snow Ph.D. Statistical Data

Re: [R] Hidden variables

2011-02-02 Thread Greg Snow
Create a namespace for your package, anything not exported will be "hidden" (though a determined person can still find it). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-pr

Re: [R] Testing whether a number belong to a set

2011-02-02 Thread Phil Spector
Dhiman - You don't say what you want the result to be if the value is in both S1 and S2, but here's an example that may give you some ideas: S1 = c('one','two','three') S2 = c('four','five','six') test = c('one','two','three','four','five','six','seven') test %in% S1 + 2 * test %in% S2 [1]

Re: [R] slightly off topic...

2011-02-02 Thread Steve Lianoglou
On Wed, Feb 2, 2011 at 4:20 PM, David Winsemius wrote: [snip] > Steve; > > Your mail client may be doing further filtering than the server. he server > passes on .txt and .pdf files. There was a posting with an attachment two > days ago. The third item in this thread: > [R] barplot with varaible-w

Re: [R] slightly off topic...

2011-02-02 Thread David Winsemius
On Feb 2, 2011, at 4:02 PM, Steve Lianoglou wrote: Hi, On Wed, Feb 2, 2011 at 3:37 PM, Sacha Viquerat wrote: i'm sorry to bother but... sometimes theres an attachment in the posts on the list, a single file called: Teil 1.2 whys that? i dont want to open it to find out, as i have used

Re: [R] slightly off topic...

2011-02-02 Thread Steve Lianoglou
Hi, On Wed, Feb 2, 2011 at 3:37 PM, Sacha Viquerat wrote: > i'm sorry to bother but... > sometimes theres an attachment in the posts on the list, a single file > called: > > Teil 1.2 > > whys that? i dont want to open it to find out, as i have used computers > before ;) > therefore i suspect it t

Re: [R] Testing whether a number belong to a set

2011-02-02 Thread Dennis Murphy
Hi: Try this: S1 <- sample(10001:98999, 1000) S2 <- sample(10001:98999, 1000) > intersect(S1, S2) # lists have some overlap [1] 72484 82292 93508 50438 29603 28965 68063 79598 16497 43016 22119 # test list x <- sample(10001:98999, 1000) # tests first if x is in S1; if not, test whether it's i

Re: [R] Testing whether a number belong to a set

2011-02-02 Thread Eik Vettorazzi
Hi, i think %in% will do exactly what you want eg. 5 %in% 1:10 Am 02.02.2011 21:49, schrieb DHIMAN BHADRA: > Hello everyone, > > I am stuck with an apparently simple issue : > > i) I have two sets S1 and S2, each containing a large number of integers, > say zip codes. > ii) Now, I just want to

Re: [R] Testing whether a number belong to a set

2011-02-02 Thread Seeliger . Curt
> So I was thinking of embedding it into a if else loop but I am stuck on how > to define the "belongs to" in R syntax. Any hint will be much appreciated. ?ifelse# handles vectors, while if() handles single values ?'%in%'# also see match() and which() Enjoy the day, cur -- Curt Seelig

[R] Testing whether a number belong to a set

2011-02-02 Thread DHIMAN BHADRA
Hello everyone, I am stuck with an apparently simple issue : i) I have two sets S1 and S2, each containing a large number of integers, say zip codes. ii) Now, I just want to test whether a particular zip code belong to S1 or S2 or neither of them. iii) If it belongs to S1, the area/region gets a

[R] slightly off topic...

2011-02-02 Thread Sacha Viquerat
i'm sorry to bother but... sometimes theres an attachment in the posts on the list, a single file called: Teil 1.2 whys that? i dont want to open it to find out, as i have used computers before ;) therefore i suspect it to be either some security problem OR to be the alternative HTML version

Re: [R] exact logistic regression

2011-02-02 Thread Dennis Murphy
Hi: Try package elrm - its description file says that it performs exact logistic regression by MCMC. I found this as the first set of hits I got from # install.packages('sos') # if necessary library(sos) findFn('exact logistic regression') HTH, Dennis On Wed, Feb 2, 2011 at 8:43 AM, Den w

Re: [R] Source code of rnorm, where can I find it?

2011-02-02 Thread Waclaw Kusnierczyk
On 02/02/2011 01:50 PM, Ista Zahn wrote: .Internal functions such as rnorm cannot be retrieved in this way as far as I know. You may have to download the source and find it direclty. In this particular case you can find the implementation of rnorm with grep -rn --include=*.c '"rnorm"' .

[R] Help with Help

2011-02-02 Thread John Filben
I have recently been reading several books on data mining which contain a few data sets.  The books offer some perspective on model choices, tuning decisions, result interpretation.  Are there any good resources that can walk me through the thought process of an experienced data miner with the

Re: [R] SVM Prediction and Plot

2011-02-02 Thread Steve Lianoglou
Hi, On Wed, Feb 2, 2011 at 1:40 PM, Brian wrote: > > There are a good few blanks in some variables in the data. There were in the > training set too. Is that a problem? Well, it looks like it's the root cause of what prompted you to post to R-help ... whether or not it's *really* a problem is an

Re: [R] Source code of rnorm, where can I find it?

2011-02-02 Thread Ista Zahn
R source is available on CRAN, e.g., http://cran.r-project.org/src/base/R-2/R-2.12.1.tar.gz Many functions can be displayed simply by typing theme , e.g., > methods(mean) [1] mean.data.frame mean.Date mean.defaultmean.difftime [5] mean.POSIXctmean.POSIXlt > mean.default Many other

Re: [R] Matching patients

2011-02-02 Thread Bill Hyman
Hi Bernardo, Thank you so much. I appreciate it. Bill - Original Message From: Bernardo Rangel Tura To: Bill Hyman Sent: Wed, February 2, 2011 12:55:56 AM Subject: Re: [R] Matching patients On Tue, 2011-02-01 at 11:01 -0800, Bill Hyman wrote: > May I ask a clinical question? For a

[R] Indexing from two variables

2011-02-02 Thread Ross Dunne
Hello, thank you all for your patience and time I am essentially trying to get disorganised data into long form for linear modelling. I have 2 dataframes "rec" and "book" Each row in "book" needs to be pasted onto the end of several of the rows of "rec" according to two variables in the row:"

Re: [R] clustering fuzzy

2011-02-02 Thread pete
After ordering the table of membership degrees , i must get the difference between the first and second coloumns , between the first and second largest membership degree of object i. This for K=2,K=3,to K.max=6. This difference is multiplyed by the Crisp silhouette index vector (si). Too it d

Re: [R] help

2011-02-02 Thread Łukasz Ręcławowicz
W dniu 2 lutego 2011 16:35 u¿ytkownik Wacek Kusnierczyk napisa³: > On 2/2/11 3:59 AM, £ukasz Rêc³awowicz wrote: > >> We don't need a loop! >> >> require(Rmpfr) >> factorial(mpfr(1:500,3800)) >> > > This is very good! But it has just a few functions... > I get an unexpected warning, though: > >

[R] JGR crashes if more than 1 script executed

2011-02-02 Thread Lou Belle
I've tried this on 2 different PCs now. I'm trying to run more than one R script w/o closing and restarting JGR. In other words, if I run one script which uses the PerformanceAnalytics package and subsequently attempt to run another script, using a package such as lattice, then JGR crashes on me

[R] Source code of rnorm, where can I find it?

2011-02-02 Thread Cristiano Strieder
Hi all, I want to check the source code of common functions available on R prompt. For example rnorm, where can I find the source code of that? -- Cristiano Strieder São José dos Campos - SP __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

Re: [R] SVM Prediction and Plot

2011-02-02 Thread Brian
There are a good few blanks in some variables in the data. There were in the training set too. Is that a problem? I don't have any na.action in my svm call either. So na.omit=na.fail causes this error: Error in na.fail.default(newdata) : missing values in object I tried the matrix. >SvmPred =

Re: [R] Flexibly Retrieving Objects with an Index

2011-02-02 Thread Christopher T. Moore
That works great. Thanks, Henrique. -Chris -- Christopher T. Moore, M.P.P. Doctoral Student Quantitative Methods in Education University of Minnesota 44.9785°N, 93.2396°W moor0...@umn.edu http://umn.edu/~moor0554 On Feb 2 2011, Henrique Dallazuanna wrote: Try this: do.call(rbind, mget(ls(pa

Re: [R] Flexibly Retrieving Objects with an Index

2011-02-02 Thread Henrique Dallazuanna
Try this: do.call(rbind, mget(ls(pattern = 'data'), envir = .GlobalEnv)) On Wed, Feb 2, 2011 at 5:20 PM, Christopher T. Moore wrote: > Greetings, > > I would like to flexibly combine several data frames objects without > specifying the exact names of the objects in memory. Should I use indexing

Re: [R] Why my package is not being generate?

2011-02-02 Thread Yihui Xie
First, you had a typo in install.packages("tests",repos="http://r-forge.r-projet.org";) the URL should be http://r-forge.r-project.org Second, R-Forge might not be as fast as you think in terms of building new packages; you can check out the schedule here: http://site.r-forge.r-project.org/ If

[R] Flexibly Retrieving Objects with an Index

2011-02-02 Thread Christopher T. Moore
Greetings, I would like to flexibly combine several data frames objects without specifying the exact names of the objects in memory. Should I use indexing to call those objects out of memory? I regularly use indexes to flexibly extract parts of data frames and lists and to read files from my h

Re: [R] Indexing from two variables

2011-02-02 Thread Ista Zahn
Hard to know exactly without seeing the structrure of rec and book, but I would start with ?merge Best, Ista On Wed, Feb 2, 2011 at 2:06 PM, dunner wrote: > > Hello, thank you all for your patience and time > > I am essentially trying to get disorganised data into long form for linear > modellin

Re: [R] Average of several line plots

2011-02-02 Thread Eduardo de Oliveira Horta
It is not clear from your message whether these data represent functions or such. Could you perhaps bring up an example? I'm guessing each data set contains evaluation points and function values at those points, and that you would like to plot these functions and the mean function all on the same

[R] Indexing from two variables

2011-02-02 Thread dunner
Hello, thank you all for your patience and time I am essentially trying to get disorganised data into long form for linear modelling. I have 2 dataframes "rec" and "book" Each row in "book" needs to be pasted onto the end of several of the rows of "rec" according to two variables in the row:" M

Re: [R] Average of several line plots

2011-02-02 Thread Peter Ehlers
On 2011-02-02 08:44, mattnixon wrote: Hi, I have several data sets which are all approximately within the same values as each other (both X and Y) and all of these data sets more or less overlap each other when plotted on the same graph. However, although each data set varies between approximat

Re: [R] Efficient way to determine if a data frame has missing observations

2011-02-02 Thread Henrique Dallazuanna
Try this: subset(as.data.frame(xtabs( ~ city + var, df)), !Freq) On Wed, Feb 2, 2011 at 1:49 PM, H Roark wrote: > > I have a data set covering a large number of cities with values for > characteristics such as land area, population, and employment. The problem I > have is that some cities lack

Re: [R] SVM Prediction and Plot

2011-02-02 Thread Steve Lianoglou
Hi, On Wed, Feb 2, 2011 at 10:35 AM, Brian wrote: > > Thanks for the reply. > > When I run this: > >> head(SvmPred) > 3570 2361 5406 2041 3440 4123 >   N    N    Y    Y    Y    Y > Levels: N Y Hmmm ... I think we'll need more info. It looks like it should be working. By your output, your `proba

Re: [R] Efficient way to determine if a data frame has missing observations

2011-02-02 Thread Erik Iverson
H Roark wrote: I have a data set covering a large number of cities with values for characteristics such as land area, population, and employment. The problem I have is that some cities lack observations for some of the characteristics and I'd like a quick way to determine which cities have m

Re: [R] Merging by factor variables

2011-02-02 Thread Erik Iverson
H Roark wrote: I'm wondering about the behavior of the merge function when using factors as by variables. I know that when you combine two factors using c() the results can be odd, as in: c(factor(1:5),factor(6:10)) which prints: [1] 1 2 3 4 5 1 2 3 4 5 I presume this is because factors ar

Re: [R] Function to locate points in 3d octants or points on twoaxes

2011-02-02 Thread David Winsemius
On Feb 2, 2011, at 12:28 PM, Bryan Hanson wrote: Thanks Dan for pointing that out. My question really arose from the need to draw splines between arbitrary 3d pairs of points, so I posted a new question to the list addressing that more specifically. While the issue of 3d splines must hav

[R] Average of several line plots

2011-02-02 Thread mattnixon
Hi, I have several data sets which are all approximately within the same values as each other (both X and Y) and all of these data sets more or less overlap each other when plotted on the same graph. However, although each data set varies between approximately the same range, there are vastly dif

[R] Merging by factor variables

2011-02-02 Thread H Roark
I'm wondering about the behavior of the merge function when using factors as by variables. I know that when you combine two factors using c() the results can be odd, as in: c(factor(1:5),factor(6:10)) which prints: [1] 1 2 3 4 5 1 2 3 4 5 I presume this is because factors are actually stored

[R] exact logistic regression

2011-02-02 Thread Den
Hello to R people Does anybody know to calculate exact logistic regression in R? Does such option exist anywhere? Surprisingly, could not find it using search engine. It is hard to believe, however, that such useful function is not implemented in R yet? Could you help, please Thank you Denis

[R] Efficient way to determine if a data frame has missing observations

2011-02-02 Thread H Roark
I have a data set covering a large number of cities with values for characteristics such as land area, population, and employment. The problem I have is that some cities lack observations for some of the characteristics and I'd like a quick way to determine which cities have missing data. For

Re: [R] SVM Prediction and Plot

2011-02-02 Thread Brian
Thanks for the reply. When I run this: > head(SvmPred) 3570 2361 5406 2041 3440 4123 NNYYYY Levels: N Y -- View this message in context: http://r.789695.n4.nabble.com/SVM-Prediction-and-Plot-tp3254421p3254570.html Sent from the R help mailing list archive at Nabble.co

[R] Why my package is not being generated?

2011-02-02 Thread Cristiano Strieder
Hi all, I have commited a new release of my package and waited for more than one day. After that "install.packages("tests",repos="http://r-forge.r-projet.org";)" still returns "package 'tests' is not available". I have done the local build & check and the package seems ok. Also have mofified the T

Re: [R] grey scale graphs

2011-02-02 Thread David Winsemius
On Feb 2, 2011, at 10:26 AM, Sebastián Daza wrote: Hi everyone, Does anyone know how to get "black and white theme" (grey scale,, I would say) graphs using lattice or ggplot2, as it is shown in this webpage: http://lmdvr.r-forge.r-project.org/figures/figures.html? I am using Sweave, and I

Re: [R] subset in a BIG matrix

2011-02-02 Thread Steve Lianoglou
Hi, On Wed, Feb 2, 2011 at 8:30 AM, alcesgabbo wrote: > > I have a matrix with a lot of values inside.. > > when I execute the folowing command > > matrix2=subset(martix, condition.) > > it works... > > but after the previous command I execute another "subset" > > matrix3=subset(martix2, cond

Re: [R] subset in a BIG matrix

2011-02-02 Thread jim holtman
To solve it, a little more data would help. At least provide exactly the statements you are using and an 'str' of the objects; e.g., str(matrix2) str(condition2) error message might indicate that the length of condition2 is larger than the subset of matrix2 that you want. On Wed, Feb 2, 2011 at

Re: [R] Function to locate points in 3d octants or points on twoaxes

2011-02-02 Thread Bryan Hanson
Thanks Dan for pointing that out. My question really arose from the need to draw splines between arbitrary 3d pairs of points, so I posted a new question to the list addressing that more specifically. While the issue of 3d splines must have been dealt with in graphics/ animation oriented p

Re: [R] Acf of Frima

2011-02-02 Thread Spencer Graves
What's farima? functional arima or fractional arima? If the former, the "fda" package includes a function "cor.fd" for "correlation matrix from functional data object(s)". If the latter, I suggest you use sos as follows: library(sos) (fr <- findFn('fractional arima')) "findFn" sear

Re: [R] Function to locate points in 3d octants or points on twoaxes

2011-02-02 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Bryan Hanson > Sent: Wednesday, February 02, 2011 5:23 AM > To: Petr Savicky > Cc: r-help@r-project.org > Subject: Re: [R] Function to locate points in 3d octants or points on > tw

Re: [R] SMA and EMA in package TTR

2011-02-02 Thread Joshua Ulrich
Hi Anyi, That's not currently possible. You could use the rollmean function in the development version of the zoo package (on R-forge) to calculate the simple moving average as you described. I would like to add this as an option to TTR functions, but it is not high on my priority list. I would

Re: [R] Finding the maximum in a particular group in a dataframe

2011-02-02 Thread Dennis Murphy
Hi: Using df as your data frame, max(subset(df, condition == 'GPR119a', select = responce)) [1] 0.6451204 You asked this question yesterday with several correct responses. What was wrong with them? Dennis On Wed, Feb 2, 2011 at 12:48 AM, Asan Ramzan wrote: > Hello > > I am trying to find a w

Re: [R] help

2011-02-02 Thread Eik Vettorazzi
Hi, maybe you rethink your calculations. Just for curiosity, what's the purpose? First of all, using prod(1:j-1-.25) #and prod(1:j) instead of a loop is much more efficent. If you need all values for a[1] up to a[j] you can use cumprod But this doesn't get you rid of numeric overflow but 1/(1*

[R] drawing from one cell to another using layout() - possible?

2011-02-02 Thread Mark Heckmann
Is it possible to cross the cell boundaries set by layout using base graphics? I.e. I want to draw e.g. a line from one layout cell to another. Is there a way to do that? layout(matrix(c(1,2), byrow=TRUE, ncol=2)) plot.new() text(0,0,paste(rep("a", 200), collapse=""), xpd=T) layout.show(2) I wou

Re: [R] grey scale graphs

2011-02-02 Thread Ista Zahn
Well, if you're using pdf, you could set the gray option there, e.g., pdf.options(colormodel="gray") Or you could just use a gray theme. In ggplot2 use + theme_gray() Not sure in lattice, but I think it also has a themeing system. Best, Ista 2011/2/2 Sebastián Daza : > Hi everyone, > Does anyo

Re: [R] help

2011-02-02 Thread Wacek Kusnierczyk
On 2/2/11 3:59 AM, Łukasz Ręcławowicz wrote: We don't need a loop! require(Rmpfr) factorial(mpfr(1:500,3800)) This is very good! I get an unexpected warning, though: Warning message: In if (mpfr.is.integer(x)) round(r) else r : the condition has length > 1 and only the first element will b

Re: [R] update not working

2011-02-02 Thread Ista Zahn
Hi Luis, Well, when I copied your code I discovered that On Wed, Feb 2, 2011 at 9:42 AM, Luis Ridao wrote: > R-help, > > I'm using the "update" command for a multiple regression model and it is > just not working: > >> update(model1, . ~ . – temp:wind:rad,data=ozone.pollution)

[R] grey scale graphs

2011-02-02 Thread Sebastián Daza
Hi everyone, Does anyone know how to get "black and white theme" (grey scale,, I would say) graphs using lattice or ggplot2, as it is shown in this webpage: http://lmdvr.r-forge.r-project.org/figures/figures.html? I am using Sweave, and I cannot get that color configuration. I have added the f

Re: [R] matrix and a function - apply function

2011-02-02 Thread Eik Vettorazzi
there is no need for 'apply' here, because R can handle vectors. ord<-m[,1]+m[,2]/m[,1] Am 02.02.2011 15:12, schrieb ADias: > > Hi > > I have this function and this matrix: > > function(x,y) x+y/x > > m<-matrix(c(1,2,4,2,10,8),3,2) > >> m > [,1] [,2] > [1,]12 > [2,]2 10

Re: [R] matrix and a function - apply function

2011-02-02 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 02.02.2011 16:05:21: > > On Feb 2, 2011, at 9:12 AM, ADias wrote: > > > > > Hi > > > > I have this function and this matrix: > > > > function(x,y) x+y/x > > > > m<-matrix(c(1,2,4,2,10,8),3,2) > > > >> m > > [,1] [,2] > > [1,]12 > > [2,]

Re: [R] SVM Prediction and Plot

2011-02-02 Thread Steve Lianoglou
Hi, On Wed, Feb 2, 2011 at 9:56 AM, Brian wrote: > > Hi > > I'm trying to predict using a model I fitted with SVM. > > I constructed the model (called Svm) using a training set, and now I want to > use a test set (called BankTest) for prediction. > > The response variable is in the first column o

Re: [R] matrix and a function - apply function

2011-02-02 Thread David Winsemius
On Feb 2, 2011, at 9:12 AM, ADias wrote: Hi I have this function and this matrix: function(x,y) x+y/x m<-matrix(c(1,2,4,2,10,8),3,2) m [,1] [,2] [1,]12 [2,]2 10 [3,]48 each row represent a point (x,y) in a chart and I want via my fucntion to calculate the im

[R] SVM Prediction and Plot

2011-02-02 Thread Brian
Hi I'm trying to predict using a model I fitted with SVM. I constructed the model (called Svm) using a training set, and now I want to use a test set (called BankTest) for prediction. The response variable is in the first column of BankTest. > SvmPred = predict(Svm, BankTest[,-1], probability=

[R] Help me apply mapply

2011-02-02 Thread Alaios
Hello all I would like to ask your help use mapply. I have a function called findCell that takes two arguments(x,sr) where x is a vector of size two (e.g x<-c(2,3) and sr is a matrix. I would like to call many times the findCell function (thus I need mapply) for different x inputs but always for

[R] Need help subsetting time series data

2011-02-02 Thread Nathaniel
Hi all, I have multiple datasets of time series data taken from GPS collars. The collars are supposed to take a fix every hour on the half hour, i.e., 0:30, 1:30, 2:30...23:30, (because it sometimes takes longer for the collars to acquire a location the minute of these locations vary from 30-34)

[R] matrix and a function - apply function

2011-02-02 Thread ADias
Hi I have this function and this matrix: function(x,y) x+y/x m<-matrix(c(1,2,4,2,10,8),3,2) > m [,1] [,2] [1,]12 [2,]2 10 [3,]48 each row represent a point (x,y) in a chart and I want via my fucntion to calculate the image in order to get this results: for point (1

Re: [R] Regression type 2, x measured with error

2011-02-02 Thread misil
Excellent!! thanks for all! misil 2011/2/1 mbedward [via R] > > Another search term is "geometric mean regression". > > For simple models you can try the lmodel2 package. > > Michael > > On 2 February 2011 04:31, David Winsemius <[hidden > email]

[R] update not working

2011-02-02 Thread Luis Ridao
R-help, I'm using the "update" command for a multiple regression model and it is just not working: > update(model1, . ~ . – temp:wind:rad,data=ozone.pollution) Error: unexpected input in "model2<-update(model1, . ~ . –" > summary(model1) Call: lm(formula = ozone ~ temp * wind * rad + I(rad^2) +

Re: [R] error in density plot

2011-02-02 Thread David Winsemius
On Feb 2, 2011, at 8:22 AM, Ben Bolker wrote: Ramya gmail.com> writes: I have the code for the density plot j <- 8 plot(density(diff_in_sample[,1]), main = list.files()[j]) for(i in 1:25){ lines(density(diff_in_sample[,i])) } This gives me an error Error in density.default(diff_in_sample[,

[R] General Solution to Drawing a Spline Curve in 3d?

2011-02-02 Thread Bryan Hanson
Hello Again... I know that R has plenty of functions for drawing splines between two points in 2d, and plenty of ways to fit a spline curve among various points in 2d or 3d (I think), but, is there a function which can be used to draw a simple spline curve between any two points in 3d spa

Re: [R] Applying multiple functions to one object

2011-02-02 Thread Eik Vettorazzi
Hi Karl, same to me. Much of the times when coding I think, 'damn it, I have seen that before, but where...' ... and so the following is from scratch, not from memory. fun<-function(x,...){ mthd<-list(...) lapply(mthd,function(m) do.call(m,list(x))) } fun(3.14, mode, typeof, class) there is no

[R] Applying multiple functions to one object

2011-02-02 Thread Karl Ove Hufthammer
Dear list members, I recall seeing a convenience function for applying multiple functions to one object (i.e., almost the opposite of 'mapply’) somewhere. Example: If the function was named ’fun’ the output of fun(3.14, mode, typeof, class) would be identical to the output of c(mode(3.14),

  1   2   >