Displaying 20 results from an estimated 10000 matches similar to: "a very simple question"
2009 Aug 22
3
integer and character conversion
Dear all,I want to convert a long integer to a string, and for example,
100000000
I used as.character(1000000000) e.g, and it gives me back 1e+???. What I
want is a exact form, not exponential form. Any ideas how to do it? Thank
you very much.
Regards,
Dajiang
[[alternative HTML version deleted]]
2011 Mar 25
2
a question on R optimization functions
Dear All,
I use nlminb or optim for maximizing likelihood functions. Sometimes,
the parameter values happen to be NA, then the program will hang there
and iterate forever without stopping. No error message will be
produced. So I can not use error catch method such as "try". Are there
any suggestions how I can circumvent this problem? Maybe I can time a
function, and if the time exceeds
2009 Apr 26
2
RWeka prediction
Dear All,I encountered a problem when I use RWeka for prediction.
Specifically, I use the following:
res=J48(X1~.,data=mydata);
predict(res), #it worked fine
but when I tried to use a different data set,
i.e. predict(res,newdata=mynewdata);
all the predictions I get is 0, which apparently is problematic.
What is weird is, if I use the old data, but use the newdata option,
i.e.
2009 Jul 23
2
Bug in seq() (PR#13849)
Full_Name: Jeremiah Cohen
Version: 2.9.0
OS: Windows XP
Submission from: (NULL) (129.59.230.235)
I believe there is a bug in the seq() function for certain values of the "from"
argument. Here are examples:
> seq(-.2, .1, .1)
[1] -0.2 -0.1 0.0 0.1
> seq(-.3, .1, .1)
[1] -3.000000e-01 -2.000000e-01 -1.000000e-01 5.551115e-17 1.000000e-01
> seq(-.4, .1, .1)
[1] -0.4 -0.3
2009 Mar 12
1
R library help files
Dear All,
I am writing an R library myself. The package build ok, and can be installed. But when I load the library into R using library('xyz'), then I type ?xyz for help in one of the functions named xyz as well, the following error occured,
No documentation for 'xyz' in specified packages and libraries:
I do put the .Rd files into the man folder, and the html help files are all
2004 Sep 03
6
seq
Hi everyone,
I've tried the below on R 1.9.1 and the 2004-08-30 builds of R 1.9.1
Patched and R 2.0.0 on Windows 2000, and the results are consistent.
> seq(0.5, 0, by = -0.1)
[1] 0.5 0.4 0.3 0.2 0.1 0.0
> seq(0.7, 0, by = -0.1)
[1] 7.000000e-01 6.000000e-01 5.000000e-01 4.000000e-01 3.000000e-01
2.000000e-01 1.000000e-01 -1.110223e-16
Is this really the intended behaviour?
2012 Mar 01
4
problem with sum function
Hi!
I'm running R version 2.13.0 (2011-04-13)
Platform: i386-pc-mingw32/i386 (32-bit)
When i type in the command:
sum(c(-0.2, 0.8, 0.8, -3.2, 1.8))
R returns the value:
-5.551115e-17
Why doesn't R return zero in this case? There shouldn't be any rounding
error in a simple sum.
Thanks,
Mark
2012 Jun 18
6
Inconsistency using seq
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 message in context: http://r.789695.n4.nabble.com/Inconsistency-using-seq-tp4633739.html
Sent from
2007 May 10
1
A simple question about PRINCOMP
Hi,
I just wonder if this is a rounding error by the princomp command in R.
Although this does not make much sense, using a hypothetical dataset, a,
a<-matrix(runif(1000),100,10)
I did PCA with the princomp, and compared it with the results estimated
with the eigen and the prcomp commands. And I found some differences in
the results: opposite signs in the loadings; slight differences in
2010 Oct 28
3
0.3 is not 0.3, bug in seq() function?
Dear List,
I've been running a numerical simulation and I found this odd error in my code where the which command could not identify which rows of a column of data.frame were corresponding to the value 0.3. There are 7 unique values in this column (0.01,0.05,0.1,0.2,0.3,0.4,0.5), and this does not work only for 0.3. So I looked at the column and manually tried to use the which() command, and
2013 Mar 13
1
saving vector output as numeric
Hi everybody,
I'm trying to create a numerical data frame on which to perform PRCC.
So far I have created a data frame that consists of function/vector
output that displays in numerical form, but when I try and run PRCC
(from epiR package) I get the following error message:
"Error in solve.default(C) :
Lapack routine dgesv: system is exactly singular"
It appears this is because
2010 Sep 29
3
[LLVMdev] spilling & xmm register usage
Hello everybody,
I have stumbled upon a test case (the attached module is a slightly
reduced version) that shows extremely reduced performance on linux
compared to windows when executed using LLVM's JIT.
We narrowed the problem down to the actual code being generated, the
source IR on both systems is the same.
Try compiling the attached module:
llc -O3 -filetype=asm -o BAD.s BAD.ll
Under
2005 May 23
1
How to convert a character string to a number
Hi everyone,
I have a simple problem but donĀ“t know how to solve it.
I read in a table from a text file that looks like that:
-3,932200E-01 -2,000000E-01 4,999995E-02
-3,932099E-01 -1,000000E-01 3,999996E-02
-3,932000E-01 0,000000E+00 3,999996E-02
-3,931899E-01 -1,000000E-01 4,499996E-02
-3,931800E-01 -1,000000E-01 4,499996E-02
-3,931699E-01
2009 Mar 24
4
Error in FrF2 example on Mac OS
Dear all,
I just noticed that the 0.9 update for FrF2 did not work out for Mac OS due
to an error in an example that ran without error on all other platforms. I
do not find any reason for this. In the past, umlauts or tab characters have
sometimes been an issue, but I didn't find any of these. The function
definition is
FrF2(nruns = NULL, nfactors = NULL, factor.names = if
2019 Sep 27
2
Opportunity to split store of shuffled vector.
> I may be missing something obvious, but what is `vector` defined as here? Can you provide a buildable example?
Sorry, I should provide a cross-platform version using vector
extension of frontend :) `vector int` is a vector extension on
PowerPC, which is enabled if you set target to PowerPC platforms.
Example below should be successfully compiled in any platform:
typedef float v4sf
2008 Apr 24
2
problem with "which"
Hi,
I'm having trouble with the "which" or the "seq" function, I'm not sure.
Here's an example :
> lat=seq(1,2,by=0.1)
> lat
[1] 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0
> which(lat==1)
[1] 1
> which(lat==1.1)
[1] 2
> which(lat==1.2)
[1] 3
> which(lat==1.3)
[1] 4
> which(lat==1.4)
[1] 5
> which(lat==1.5)
[1] 6
>
2019 Oct 04
2
Opportunity to split store of shuffled vector.
Canonicalizing to a masked store intrinsic is possible, but we might have
to expand back to the load/shuffle/store sequence for targets that don't
support masked store. And then you'd likely have to do the store splitting
that I think is being requested for the original pattern anyway.
But I'd like to step back to the premise - "LLVM seems to always generate
vector instructions
2001 Nov 28
2
Problems with rank()
If you enter the following values for x and y:
x: 2.2 3.7 2.1 0.4 2.8 0.3 0.4 1.4 5.4 6.0
y: 6.0 8.1 1.8 1.3 5.2 0.6 1.0 1.9 6.8 6.5
and do rank(abs(y-x)),
you should get two ties, one at 0.3 and one at 0.5.
R, and S-Plus5 by that matter recognise the tie at 0.5 and give
it rank 3.5, but gives one of the two 0.3 values rank 1 and one of
them 2, whereas they should boh be 1.5.
Any suggestions?
when
2013 Jul 18
0
[LLVMdev] SIMD instructions and memory alignment on X86
Are you able to send any IR for others to reproduce this issue?
On Wed, Jul 17, 2013 at 11:23 PM, Peter Newman <peter at uformia.com> wrote:
> Unfortunately, this doesn't appear to be the bug I'm hitting. I applied
> the fix to my source and it didn't make a difference.
>
> Also further testing found me getting the same behavior with other SIMD
> instructions.
2002 Oct 29
1
pretty not pretty
Hi,
I have a following vector:
> smallch
[1] 0.0652840 0.1181300 0.0319370 0.0155700 0.0464110 0.0107850
[7] 0.0158970 0.0375900 0.0603090 0.0310300 0.0105920 0.0540580
[13] -0.0177740 0.0039393
Pretty (R 1.5.1) has problems with zero:
> pretty(smallch)
[1] -2.000000e-02 -3.469447e-18 2.000000e-02 4.000000e-02 6.000000e-02
[6] 8.000000e-02 1.000000e-01 1.200000e-01