Hi,
Is there any package in R which can help me do rule based text mining.
-Nalin
American Express made the following annotations on Mon Jun 18 2012 00:27:17
**
This message and any attachments are solely for the
Hi R-Experts,
I want to know for one parameter case, which function is better or correct,
optim or optimization?
I want to optimize the function to get mle using optimization function for
single parameter case. Is there any other method to check the optimization
really gives the global mle
Hi,
I'd like to make an interactive graph like this:
http://blog.ggplot2.org/post/25201174009/name-popularity
I believe he was done with the ggplot2 and saved in svg format. if someone
has experience with this subject (graph interactive web) could give me a
help?
Thanks
--
Éder David Borges da
Dear all members,
I am Phd. candidate student at Chulalongkorn U., Thailand. I am interested in
expectation maximization algorithm (EM) and multiple imputation (MI) for
imputation missing values(missing at random(MAR) and missing not at random
(MNAR)) in IRT (3-PL). So, I want to know about
hi
I have a data and have to convert it into the given expression
like
data=1000:2000 and expression is exp()
The code should be checking the validity of the expressions and give out the
result that it is valid expression or invalid expression.
can any one help
-
Thanks in Advance
Hi!
I created a table named TEST2 in my base Access named CINDY.
My columns are : A (numeric), B (character), C (numeric)
There are values in this table.
In R, I created a data.frame fr:
fr - data.frame(A = c(1,2,3),B = c(c,d,u), C=c(4,5,6))
I would like export this data.frame in my table
Hi,
I am trying to install R from source and using configure command but
gettting one error message.
*configure: error: --with-readline=yes (default) and headers/libs are not
available*
I am installing on server which is not connected by net so can install by
source only. Can u pls suggest me
David Winsemius wrote
That's going to remove a lot of rows.
Since you are not telling us what columns correspond to those
concepts, I'm going to use the terms you are. Something along the
lines of:
require(lattice)
histogram( ~ hours | bird, data=dat2, nint =24 , xlim=c(0,24))
Hi,
I am trying to install R from source and using configure command but
gettting one error message.
*configure: error: --with-readline=yes (default) and headers/libs are not
available*
I am installing on server which is not connected by net so can install by
source only. Can u pls suggest me
Hello
I have a loop to draw few samples and I want to but this samples in one list,
how I can make this? when I use it , the list show just the last sample. I want
to know the correct way to put all samples in one list.
Regards
Sulafah
[[alternative HTML version deleted]]
I think that for now I'll keep it as is and try to clean the data in excel.
Could someone please tell me how can I export the result to csv, since
write.csv exports only the last j?
Thank you so much in advance!
--
View this message in context:
Hello,
I got this matrix of gentic distances between my samples. it is 85x85 but
only lower half (without diagonal) contains my distances. How can I make a
mean and standard deviation on these distances, please ?
Thank you!
Lucia
--
View this message in context:
Hello,
The error message gives you the solution.
Regards
Le 18/06/2012 18:26, Manish Gupta a écrit :
Hi,
I am trying to install R from source and using configure command but
gettting one error message.
*configure: error: --with-readline=yes (default) and headers/libs are not
available*
I
Do you mean, --with-readline=no or after installing the readline headers?
Regards
Le 18/06/2012 20:17, manish gupta a écrit :
I used it but still same error.
Regards
On Mon, Jun 18, 2012 at 7:14 PM, Pascal Oettlikri...@ymail.com wrote:
Hello,
The error message gives you the solution.
On Sat, Jun 16, 2012 at 2:10 PM, Stephen Eglen
s.j.eg...@damtp.cam.ac.uk wrote:
A recent paper on visualisation (in Neuron, a leading neuroscience
journal) surveyed how well previous articles in this journal labelled their
graphs (e.g. axis labelling and describing their error bars). Of
Hello all,
I have a general question about time series and I wonder if someone
could help me. I have time series data of this form:
x=c(rnorm(500,0,1),rnorm(500,5,1),rnorm(500,10,1),rnorm(500,3,1),rnorm(500,8,1),rnorm(500,4,1),rnorm(500,1,1),rnorm(500,7,1))
time=1:4000
plot(time,x)
Each
Dear All,
we have released version 0.6 of the igraph package today. This is a
major new version, with a lot of new features, and (sadly) it is not
completely compatible with code that was written for the previous
igraph versions. (See Major new features below for details.)
I have included below
On 18/06/2012 10:26, Manish Gupta wrote:
Hi,
I am trying to install R from source and using configure command but
gettting one error message.
*configure: error: --with-readline=yes (default) and headers/libs are not
available*
I am installing on server which is not connected by net so can
Hi Lucia,
On Mon, Jun 18, 2012 at 6:11 PM, lucinka lucia.bohus...@gmail.com wrote:
Hello,
I got this matrix of gentic distances between my samples. it is 85x85 but
only lower half (without diagonal) contains my distances. How can I make a
mean and standard deviation on these distances,
Hello,
Have you tried what I wrote in my last post?
Revised:
# Make a copy first, and operate on the copy.
dep - departures
names(dep) - NULL
dep - data.frame(dep)
Rui Barradas
Em 18-06-2012 11:09, capital_P escreveu:
David Winsemius wrote
That's going to remove a lot of rows.
Since you
Rui Barradas wrote
Try
names(departures) - NULL
dep - data.frame(departures[ !sapply(departures, is.null) ])
You now have data.frame 'dep'.
dep - data.frame(departures[ !sapply(departures, is.null) ])
Error in data.frame(`121.1` = list(device_info_serial = integer(0), hour =
On Fri, Jun 15, 2012 at 9:22 PM, gianni lavaredo
gianni.lavar...@gmail.com wrote:
Dear Researches,
sorry for disturb. I wish to improve my figure in R plotting the relative
frequencies of my data set.
library(lattice)
a - c(0,0,0,1,1,2,4,5,6,7,7,7,7,7,8,8,8,8,9,9,9,9,10,10,11)
histogram(a,
I've been out for a week, with one more to go. I'll look at this in
earnest when I return.
Terry T
On 06/17/2012 04:07 AM, Jürgen Biedermann wrote:
Dear John,
Thank you very much for your help! It was very important for getting
along further.
I found out some additional things which I
What do you mean by only the last j? write.csv writes to a file you
specify and I assume that you are changing the file name if you are
making successive writes. You need to provide more detail.
On Mon, Jun 18, 2012 at 5:47 AM, @ngel aggelopou...@gmail.com wrote:
I think that for now I'll keep
Hello Jim
thank you so much for your response.
When I use write.csv, on the csv file is saved only the last loop
So when I write
results.matrix - apply(degree_w(net.static[[i]]), 2, mean)
write.csv(results.matrix, file = results.csv)
instead of getting a 550 line document with all loop results,
Then don't do that.
write.csv is designed to write a complete matrix or data frame in one call.
Combine your list of matrices into one (e.g. using sapply) and write that in
one call afterward rather than piecewise as you do the calculations.
Stefan, that looks wonderful! I am most certainly going to try to
download and use your 'wordspace', even though I am unsure on how to
even download it at this point. Many thanks! But yes, I need the
Canberra distance unfortunately. But decreasing the time by more than
60% will save me days! If I
Hi Duncan,
That's right but I want to be able to use this to replace back slashes with
front slashes when I copy and paste file paths. How can I make this work so I
don't get this error?
Thanks.
Dan
-Original Message-
From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
Sent:
I would be good if you showed us what you are doing now. There are
ways of drawing samples and storing in a list, but we have to see what
you are trying to accomplish. You could use 'lapply' or do it in a
loop, but the solution would depend on how you are doing things now
and what is the problem
On Sat, Jun 16, 2012 at 1:41 PM, Stephen Eglen
s.j.eg...@damtp.cam.ac.uk wrote:
R does a great job with the fine details regarding plots. e.g in the
following:
library(lattice)
y - -4:4/10
xyplot(y~1, las=1)
the y axis is labelled with numbers -0.4, -0.2, 0.0, 0.2, 0.4 with the
numbers
I used it but still same error.
Regards
On Mon, Jun 18, 2012 at 7:14 PM, Pascal Oettli kri...@ymail.com wrote:
Hello,
The error message gives you the solution.
Regards
Le 18/06/2012 18:26, Manish Gupta a écrit :
Hi,
I am trying to install R from source and using configure command
Hello,
Please read the posting guide: to draw samples from what? A vector?
Matrix? Etc...
Anyway, here it goes. In all cases the result is a list with 4 elements.
# Draw 4 samples of integers from 1 to 10
x - rep(10, 4)
# without replacement
set.seed(1)
lapply(x, sample, size=6)
# with
Hi all,
I am working on an optimization of the svm classification function based on
the package e1071. So far we have not been able to find any dataset that
really slows down the application. However, from R users surveys seem that
svm would be a good function to speed up.
Is there any one
What does any of this mean?
Can you give a concrete example of the transformation you hope to accomplish?
Michael
On Mon, Jun 18, 2012 at 3:10 AM, arunkumar akpbond...@gmail.com wrote:
hi
I have a data and have to convert it into the given expression
like
data=1000:2000 and
Hello all,
I was trying to create nice tables in HTML on windows and then got to know
about Pander. I have installed Pandoc, devtools, Rtools (which has same
path as of R ) . I have also gone through the depends of Pander and fixed
it all. Still i am not able to install and getting a conflicting
Possibly Amelia: http://cran.r-project.org/web/packages/Amelia/index.html
Best,
Michael
On Mon, Jun 18, 2012 at 3:19 AM, Kamontip Srihaset
kamonti...@student.chula.ac.th wrote:
Dear all members,
I am Phd. candidate student at Chulalongkorn U., Thailand. I am interested in
expectation
Hi everyone,
I have a list betaMoments with 2 levels, e.g.
beta1 = list(
+m = 4,
+v = 5
+)
beta2 = list(
+m = 6,
+v = 7
+)
betaMoments = list()
betaMoments[[1]] = beta1
betaMoments[[2]] =
I noticed about a couple weeks ago that my R start up script starting showing
the below errors, following the line Type 'q()' to quit R
Not sure what I did different and so far it hasn't caused major problems but
kind of fear that it will.
Can you please help?
I also posted my Rprofile below.
Thanks for your response, John. That was helpful.
I was using Type III from Anova() as a comparison to some results I had
obtained JMP, which I've lost access to and have moved on to R, and I was
confused by the error. Given that I do have a continuous covariate, the
analyses are not likely
Hello,
I am trying to carry out a phylogenetic autoregression to test whether my
data show a phylogenetic signal, but I keep calculating bizzare R-squared
values.
My script is:
library(ape)
x -
On Jun 18, 2012, at 5:47 AM, @ngel wrote:
I think that for now I'll keep it
There is no it in this message. Users of Nabble often fail to read
the POsitng Guide where it is requested that you include context.
as is and try to clean the data in excel.
Could someone please tell me how
Hello,
Ok, sorry about the misleading tip.
This should do it.
do.call(rbind, dep)
Rui Barradas
Em 18-06-2012 13:32, capital_P escreveu:
Rui Barradas wrote
Try
names(departures) - NULL
dep - data.frame(departures[ !sapply(departures, is.null) ])
You now have data.frame 'dep'.
dep -
Hi A.K.,
That works but when I copy and paste from Window explorer it will have a single
backslashes and not double. It works with double as what you have in your
example below but not with single as what I would end up passing.
Do you have any other suggestions or methods to accomplish this?
It so happens I have been looking at very similar changes, as well as
adding multi-threading support for dist(); these should make it into
R-devel later this summer.
Best,
luke
On Sun, 17 Jun 2012, Stefan Evert wrote:
I'm working on analyzing a large data set, lets asume that
Please DO NOT put ads for your services on this site. This is a violation
of the R forum terms. I will be forwarding this issue to the appropriate
moderator to take further action.
On Tue, Jun 12, 2012 at 1:37 PM, Kanna ka...@silverxis.com wrote:
[1]Click here to unsubscribe if you no
see inline!
On Mon, Jun 18, 2012 at 12:38 AM, nata...@orchidpharma.com wrote:
Thanks Kjetil for your detailed code for log-Cholesky but my situation is
like optimization of the variables inside the matrix.
But you must of course call my function makemat inside the call
to optim() or whatever
@angel,
You can try append option in write.table
for e.g.
for(i in 1:20)
write.table(i,out.txt,append=T,sep=\t,row.names=F,col.names=F)
This will help you save your all results by writing each results on
subsequent rows.
Hope this helps
Ozgur
Hello Jim
thank you so much for your response.
SEARCH!
Go to rseek.org
Type missing data imputation .
You will bring up several alternatives.
-- Bert
On Mon, Jun 18, 2012 at 8:04 AM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
Possibly Amelia: http://cran.r-project.org/web/packages/Amelia/index.html
Best,
Michael
On Mon,
Please study how escapes work. The representation you see in the source code is
not the same as what is actually stored in memory.
As to your problems with the clipboard, I recommend writing scripts that do not
interact with the clipboard directly. Violating this rule puts an error-prone
human
The parser (the part of R that interprets text as R code) interprets things like
\t as the tab character and there is no way to avoid that. However, when
the functions readLines(), scan(), and readline() handle input they do not
assign any special
meanings to backslashes. Hence, if you want to
Please ignore my previous request for clarification. I was able to resolve
my problem using getNodeSet.
Thanks,
Santosh
On Thu, Jun 14, 2012 at 10:54 AM, Santosh santosh2...@gmail.com wrote:
Dear Rxperts,
I am back to favoRite! I would need your favoR, please!
Is there a way to use read
Jeff - Thanks. I think I'll just stick to using file.choose().
Dan
-Original Message-
From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us]
Sent: Monday, June 18, 2012 10:29 AM
To: Lopez, Dan; arun
Cc: R help
Subject: Re: [R] Using Sub
Please study how escapes work. The
What do you mean by using the package?
Aren't the examples in the package manual at
http://cran.r-project.org/web/packages/dynamo/dynamo.pdf
enough for you?
Ozgur
--
View this message in context:
http://r.789695.n4.nabble.com/multiplicative-error-model-tp4633730p4633732.html
Sent from the R
Dear Justin,
On Mon, 18 Jun 2012 11:24:33 -0400
Justin Montemarano jmont...@kent.edu wrote:
Thanks for your response, John. That was helpful.
I was using Type III from Anova() as a comparison to some results I had
obtained JMP, which I've lost access to and have moved on to R, and I was
On Jun 18, 2012, at 11:25 AM, Lopez, Dan wrote:
I noticed about a couple weeks ago that my R start up script
starting showing the below errors, following the line Type 'q()' to
quit R
I didn't see any errors reported. I didn't see any warnings, either.
--
David.
Not sure what I did
David,
Sorry I should have been more specific. They are not as much errors as they are
extra script that is running at startup after Type q() to quit R. It wasn't
there before. And am thinking eventually it could become a problem.
Thanks.
Dan
Here it is again...what it looks like when I first
As I recall, there is a package that can be used to create interactive svg
files. I don't remember its name, but I seem to recall it was fairly easy
to find on the CRAN packages page.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
?suppressPackageStartupMessages
Put this into your appropriate startup file.
?Startup ## for details on starting R and what files are executed at
startup.
-- Bert
On Mon, Jun 18, 2012 at 12:46 PM, Lopez, Dan lopez...@llnl.gov wrote:
David,
Sorry I should have been more specific. They are
Hi Bert,
I tried entering: ?suppressPackageStartupMessages and then
suppressPackageStartupMessages into my Rprofile.site file and the messages
still came up.
I did however go to the Misc menu and select List search path and got the
below results. Not exactly sure what it means but I do notice
Hi,
I am new to R and wondering how I can subset and average time series data
based on given irregular time periods:
Say I have a time series of a measured variable x (hourly data) in
values.csv with columns date and x which I would like to average
within certain irregular time periods
Thank you Jeff,
that sounds like the solution to my problem
but how would I do that code-wise?
could you please help?
--
View this message in context:
http://r.789695.n4.nabble.com/Loop-Help-tp4633558p4633701.html
Sent from the R help mailing list archive at Nabble.com.
HI,
i'm trying to estimate a multiplicative error model in R, i've seen the
dynamo package but it seems that i'm not able to use it. does someone know
how can i do it?
thanks
--
View this message in context:
http://r.789695.n4.nabble.com/multiplicative-error-model-tp4633730.html
Sent from the
I'm trying to create a 5-panel xyplot with each strip labelled by treatment.
The code is as follows:
xyplot(log(pfuml)~Transfer|Treat,groups=Pop,ylab=Log10 Pfu/ml,as.table=T,
type=a,
auto.key=
list(space=right,points=F,lines=T))
I've tried:
Rui Barradas wrote
sorry about the misleading tip.
This should do it.
do.call(rbind, dep)
No problem at all.
That did the trick. Thank you both so much for your help. I am forever in
your debt.
--
View this message in context:
Hi all,
Is there any problem of precision when using seq?. For example:
x- seq(0,4,0.1)
x[4]=0.3
BUT:
x[4]-0.3=5.551115e-17
It means when I use this condition within an if clause, it does not find
values with 0.3 for x[4] as it is not precisely 0.3.
Is there any bug in seq() ?
--
View this
Dear R-help,
I am trying to write a function to simulate datasets of size n which contain
two time-to-event outcome variables with associated 'Event'/'Censored'
indicator variables (flag1 and flag2 respectively). One of these indicator
variables needs to be dependent on the other, so I am
I gave you the references you need. It's up to you to read and understand
how to use them. You apparently need to work harder to do so. BTW
?anything
is an alternative way to type
help(anything)
at the command line for R's help pages.
-- Bert
On Mon, Jun 18, 2012 at 1:34 PM, Lopez, Dan
Le lundi 18 juin 2012 à 12:58 -0700, hamoreno a écrit :
Hi all,
Is there any problem of precision when using seq?. For example:
x- seq(0,4,0.1)
x[4]=0.3
BUT:
x[4]-0.3=5.551115e-17
It means when I use this condition within an if clause, it does not find
values with 0.3 for x[4] as
Please read R FAQ 7.31. The problem is with your computer (and
everyone else's), and has nothing to do with seq().
On Mon, Jun 18, 2012 at 3:58 PM, hamoreno hamor...@asu.edu wrote:
Hi all,
Is there any problem of precision when using seq?. For example:
x- seq(0,4,0.1)
x[4]=0.3
BUT:
No, this is rather the nature of floating point calculations.
You may perhaps be looking for ?all.equal or R FAQ 7.31 (I think that's the
one) which is google-able. It's a complicated subject, but those should get you
started.
Best,
Michael
On Jun 18, 2012, at 2:58 PM, hamoreno
Ouch Bert. Not patience for the newbies, I see.
I know what ?anything means which is why I didn't ask about ?Startup. But being
that I just recently discovered what Rprofile.site is I thought it might do
something different within the start-up file and tried it both ways.
Besides I think what
Thanks everyone... Seems that I will have to use round before seq to make
sure everything has the correct precision.
--
View this message in context:
http://r.789695.n4.nabble.com/Inconsistency-using-seq-tp4633739p4633750.html
Sent from the R help mailing list archive at Nabble.com.
I am doing a principle component analysis on a dataset with a lot of
different variables and have constructed a biplot of the data.
Unfortunately, as can be seen on the attached image, the biplot is very
messy, cluttered, and hard to read. I have performed a few modifications
including outlier
Hi,
I guess you need something like this:
str1-G:\\Compensation Audits_Reports\\Step Audit\\Steps off Step.accdb
gsub('','/',str1)
[1] G:/Compensation Audits_Reports/Step Audit/Steps off Step.accdb
A.K.
- Original Message -
From: Lopez, Dan lopez...@llnl.gov
To: Duncan
Hi all,
I'm using a Mac port of R on Mac 10.6. I need to install xlsx package but
it does not install. Do any of you know a way to install it? Thanks very
much.
Sincerely,
Victoria Xiao
[[alternative HTML version deleted]]
__
Hi Dan,
I am using linux. So, not sure whether this will work or you tried it before.
After you paste the path at (1:), then press enter two times. One more point.
In your path, there were spaces within slashes. So, if you do the scan, it
will return as 5 items, which you have to join
inline below
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf
Of nqf
Sent: Monday, June 18, 2012 10:30 AM
To: r-help@r-project.org
Subject: [R] Trying to speed up an
Hello,
I am doing a principle component analysis on a dataset with a lot of
different variables and have constructed a biplot of the data.
Unfortunately, as can be seen on the attached image, the biplot is very
messy, cluttered, and hard to read. I have performed a few modifications
Greetings,
I'm still very new to R; however I have been tasked with converting an S4
object into a data.frame. We are just trying to learn the basics of S4.
Could anyone offer a 'simple' example of coercing an S4 object (such as
might be stored in a package attribute) into a data.frame?
Hi,
This problems has bothered me for the lase couple of hours.
1e-100==0
[1] FALSE
(1-1e-100)==1
[1] TRUE
How can I tell R that 1-1e-100 does not equal to 1, actually, I found out
that
(1-1e-16)==1
[1] FALSE
(1-1e-17)==1
[1] TRUE
The reason I care about this is that I was try to use
Don't do the biplot. Darn hard to make sense of anyway. Plot the scores and
the loadings separately. You can see how to do that in this thread:
http://r.789695.n4.nabble.com/How-to-plot-PCA-output-td4614732.html
Good Luck. Bryan
***
Bryan Hanson
Professor of Chemistry Biochemistry
Hi all,
I'm new to R, have been reading books and trying to get started coding too.
The first thing of substance I've been trying to do is to create a function
to return a list of all binary trees of a list of ordinals. So, for
example, an input of list(3,1,2,4) would return:
list(list(1,
Hi Derek,
It's good form to provide an example with code so that we can see what
functions you're using and what you've tried.
I'm going to assume that you're using princomp(). Here's one way to
reduce the clutter:
pc.cr - princomp(USArrests, cor = TRUE)
biplot(pc.cr, xlabs=rep(x,
Nope. round() is not failsafe either. Basically, there is theoretically no
way to guarantee immunity to floating point error in conditional
comparisons. You need to either switch to integers -- which **are** exactly
represented -- or figure out another way.
Of course, practically speaking,
Tena koe Natalie
Does this do what you want?
set.seed(123)
natalie - matrix(NA, nrow=10^5, ncol=2, dimnames=list(NULL, paste0('flag',
1:2)))
natalie[,'flag1'] - rbinom(nrow(natalie), 1, 0.5)
natalie[natalie[,'flag1']==1, 'flag2'] - rbinom(sum(natalie[,'flag1']), 1,
0.95)
actually, you should build your sequences with integers and scale those to get
floating point sequences.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.us
I might try something like:
data[data$flag1 == 1, flag2] - runif(sum(data$flag1 == 1)) 0.95
and similarly for the other case.
Hope this helps,
Michael
On Mon, Jun 18, 2012 at 12:29 PM, nqf n.j.frank...@pgr.reading.ac.uk wrote:
Dear R-help,
I am trying to write a function to simulate
On Jun 18, 2012, at 1:29 PM, nqf wrote:
Dear R-help,
I am trying to write a function to simulate datasets of size n which
contain
two time-to-event outcome variables with associated 'Event'/'Censored'
indicator variables (flag1 and flag2 respectively). One of these
indicator
variables
You are perhaps not using suppressPackageStartupMessages() correctly
if you're getting those warnings: my .Rprofile has these lines:
suppressPackageStartupMessages(library(quantmod))
suppressPackageStartupMessages(library(ggplot2))
suppressPackageStartupMessages(library(lattice))
but produces no
Dear all,
I have many csv files whose contents I want to change a bit en masse. So far,
I've written code that can change them in a for loop, like so:
# Subset of files in the folder I want to change
subset = somestring
# Retrieve list of files to change
filelist=list.files()
filelist =
On 2012-06-18 10:02, Julie Truman wrote:
I'm trying to create a 5-panel xyplot with each strip labelled by treatment.
The code is as follows:
xyplot(log(pfuml)~Transfer|Treat,groups=Pop,ylab=Log10 Pfu/ml,as.table=T,
type=a,
auto.key=
Hi Michael,
I wasn't getting how to actually use it from ?suppressPackageStartupMessages
example online.
Thank you very much.
Dan
-Original Message-
From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com]
Sent: Monday, June 18, 2012 2:53 PM
To: Lopez, Dan
Cc: R help
This is standard behaviour for a floating-point computational system
like R. You might like to take a look at this blog post for a
backgrounder on floating-point arithmetic in R.
http://blog.revolutionanalytics.com/2009/03/when-is-a-zero-not-a-zero.html
# David Smith
On Mon, Jun 18, 2012 at
sapply() won't be notably faster.
What you might try (no guarantee) is wrapping things up as if you were
going to use sapply() but instead use mclapply() from the parallel
package -- that will parallelize the results and should be faster by
roughly as many cores as you use. The no guarantee
On 06/18/2012 01:49 PM, spf385 wrote:
Greetings,
I'm still very new to R; however I have been tasked with converting an S4
object into a data.frame. We are just trying to learn the basics of S4.
Could anyone offer a 'simple' example of coercing an S4 object (such as
might be stored in a package
On Jun 18, 2012, at 5:25 PM, elmo wrote:
Hi all,
I'm new to R, have been reading books and trying to get started
coding too.
The first thing of substance I've been trying to do is to create a
function
to return a list of all binary trees of a list of ordinals. So, for
example, an input
On 18-Jun-2012 21:26:41 whf1984911 wrote:
Hi,
This problems has bothered me for the lase couple of hours.
1e-100==0
[1] FALSE
(1-1e-100)==1
[1] TRUE
How can I tell R that 1-1e-100 does not equal to 1, actually,
I found out that
(1-1e-16)==1
[1] FALSE
(1-1e-17)==1
[1] TRUE
FYI,
isZero - function(x, neps=1, eps=.Machine$double.eps, ...) {
+ (abs(x) neps * eps)
+ }
x - seq(from=0, to=4, by=0.1)
isZero(x[4]-0.3)
[1] TRUE
isZero(x[4]-0.3, neps=1)
[1] TRUE
isZero(x[4]-0.3, neps=0.1)
[1] FALSE
You could also have called isZero() isValueSmallEnoughForWhatINeed().
Hello,
Try creating an index vector. In this case, I've called it 'one'.
Then, 'n.one' is the number of ones in flag1.
(Since data is an R function, I've renamed your example dat).
n - 10 # number of observations
# First make up some data
set.seed(123)
dat - data.frame(flag1=rbinom(n, 1,
It so happens I have been looking at very similar changes, as well as
adding multi-threading support for dist(); these should make it into
R-devel later this summer.
That's good to hear! I was thinking about giving OpenMP a try in my package,
but am not sure whether it's worth the overhead
1 - 100 of 116 matches
Mail list logo