Displaying 20 results from an estimated 574 matches for "conv".
Did you mean:
cons
2002 Apr 17
4
Problem w/ axis and distortion in a plotting function
I have a function for plotting soil texture that I am having a problem with.
The function is:
plot.psd <- function(sand, clay, ...) {
conv.ter <- function(x, y) {
x.con <- 100 - x - y*cos(1/3*pi)
y.con <- y*sin(1/3*pi)
data.frame(x=x.con, y=y.con)
}
plot(conv.ter(sand, clay), xlim = c(0,100), ylim = c(0,100*sin(1/3*pi)),
axes = FALSE, xlab="", ylab="", ...)
lines(conv.ter(c(100,0), c(0...
2004 Feb 01
4
I can't make .C(...) web-page example.
Hi everyone!
I'm trying to lear how to call external C code in R but even the R help
web-page example is drive me crazy.
I copy-paste the example at:
http://stat.ethz.ch/R-manual/R-patched/doc/manual/R-exts.html#Interface%20functions%20.C%20and%20.Fortran
here is the example:
void convolve(double *a, int *na, double *b, int *nb, double *ab)
{
int i, j, nab = *na + *nb - 1;
for(i = 0; i < nab; i++)
ab[i] = 0.0;
for(i = 0; i < *na; i++)
for(j = 0; j < *nb; j++)
ab[i + j] += a[i] * b[j];
}
called from R by
conv <- function(a, b)
.C("convolve...
2007 Jul 11
0
libswfdec/swfdec_bits.c
...ed (fixes #11492)
Hopefully fixes it...
diff --git a/libswfdec/swfdec_bits.c b/libswfdec/swfdec_bits.c
index c8a5062..8ec6936 100644
--- a/libswfdec/swfdec_bits.c
+++ b/libswfdec/swfdec_bits.c
@@ -307,11 +307,9 @@ swfdec_bits_get_float (SwfdecBits * b)
SWFDEC_BYTES_CHECK (b, 4);
- conv.i = *((gint32 *) b->ptr);
+ conv.i = (b->ptr[3] << 24) | (b->ptr[2] << 16) | (b->ptr[1] << 8) | b->ptr[0];
b->ptr += 4;
- conv.i = GINT32_FROM_LE (conv.i);
-
return conv.f;
}
@@ -323,40 +321,30 @@ swfdec_bits_get_float (SwfdecBits * b)
* use this c...
2007 Jul 11
0
Branch 'as' - 3 commits - libswfdec/swfdec_bits.c
...ed (fixes #11492)
Hopefully fixes it...
diff --git a/libswfdec/swfdec_bits.c b/libswfdec/swfdec_bits.c
index c8a5062..8ec6936 100644
--- a/libswfdec/swfdec_bits.c
+++ b/libswfdec/swfdec_bits.c
@@ -307,11 +307,9 @@ swfdec_bits_get_float (SwfdecBits * b)
SWFDEC_BYTES_CHECK (b, 4);
- conv.i = *((gint32 *) b->ptr);
+ conv.i = (b->ptr[3] << 24) | (b->ptr[2] << 16) | (b->ptr[1] << 8) | b->ptr[0];
b->ptr += 4;
- conv.i = GINT32_FROM_LE (conv.i);
-
return conv.f;
}
@@ -323,40 +321,30 @@ swfdec_bits_get_float (SwfdecBits * b)
* use this c...
2009 Sep 26
5
raidz failure, trying to recover
...256
block=507 (7ec00) transaction=15980522
Now lets say i want to go back in time on this, using the program can help me do that. If i wanted to go back in time to tgx 15980450...
bash-3.00# /tmp/findUberBlock /dev/dsk/c0t1d0 -t 15980450
dd if=/dev/zero of=/dev/dsk/c0t1d0 bs=1k oseek=180 count=1 conv=notrunc
dd if=/dev/zero of=/dev/dsk/c0t1d0 bs=1k oseek=181 count=1 conv=notrunc
dd if=/dev/zero of=/dev/dsk/c0t1d0 bs=1k oseek=182 count=1 conv=notrunc
dd if=/dev/zero of=/dev/dsk/c0t1d0 bs=1k oseek=183 count=1 conv=notrunc
dd if=/dev/zero of=/dev/dsk/c0t1d0 bs=1k oseek=184 count=1 conv=notrunc
dd...
2010 Dec 02
1
Strange problems with compiling dll
...for(i = l[0]; i <= j[0] + 1; i++){
c = c * i / (l[0] - i + 1);
}
}
}
return ScalarInteger(c);
}
But, when I try to compile it I have 5 errors, and all of them come form
linker and say next (Code::Blocks):
||=== mcb2, Release ===|
obj\Release\conv.o:conv.c|| undefined reference to `INTEGER'|
obj\Release\conv.o:conv.c|| undefined reference to `INTEGER'|
obj\Release\conv.o:conv.c|| undefined reference to `Rf_ScalarInteger'|
obj\Release\conv.o:conv.c|| undefined reference to `Rf_ScalarInteger'|
obj\Release\conv.o:conv.c|| undefi...
2010 Dec 03
1
Strange problems with compiling dll
...= l[0]; i <= j[0] + 1; i++){
c = c * i / (l[0] - i + 1);
}
}
}
return ScalarInteger(c);
}
But, when I try to compile it I have 5 errors, and all of them come form
linker and say next (Code::Blocks):
||=== mcb2, Release ===|
obj\Release\conv.o:conv.c|| undefined reference to `INTEGER'|
obj\Release\conv.o:conv.c|| undefined reference to `INTEGER'|
obj\Release\conv.o:conv.c|| undefined reference to `Rf_ScalarInteger'|
obj\Release\conv.o:conv.c|| undefined reference to `Rf_ScalarInteger'|
obj\Release\conv.o:conv.c|| undefi...
2017 Aug 02
3
[InstCombine] Simplification sometimes only transforms but doesn't simplify instruction, causing side effect in other pass
...o fix such kind of problem.
The testcase:
----------------------------- a.ll ----------------------------------
@a = global i64 0, align 8
@b = global i32 0, align 8
define i32 @_Z25InternalUncompressAllTagsv(i16* %arrayidx) local_unnamed_addr {
entry:
%t1 = load i16, i16* %arrayidx, align 2
%conv.i = zext i16 %t1 to i32
%and.i = and i32 %conv.i, 255
%and7.i = and i32 %conv.i, 1792
%t3 = zext i32 %and7.i to i64
%t4 = load i64, i64* @a, align 8
%add.i = add i64 %t4, %t3
%cmp1 = icmp eq i64 %add.i, 1
%cmp2 = icmp ult i32 %and.i, 101
%bool = and i1 %cmp1, %cmp2
br i1 %bool, la...
2012 May 26
2
[PATCH] Update diag/mbr instruction to match the current filename.
...a7dd..080d65b 100644
--- a/diag/mbr/README
+++ b/diag/mbr/README
@@ -7,9 +7,9 @@ handoff.bin Show the data that the BIOS/MBR hands off to an MBR/VBR.
Writing out an MBR is straight forward (it is assumed below that /dev/hda is the target raw device and /dev/hda1 is the target partition):
- dd conv=notrunc bs=440 count=1 if=mbr.bin of=/dev/hda
+ dd conv=notrunc bs=440 count=1 if=handoff.bin of=/dev/hda
Writing a VBR to match Syslinux requires more work as it must have a jump and be offset into the partition:
echo -en "\0353\0130\0220" |dd conv=notrunc bs=1 count=3 of=/dev/h...
2014 Jul 05
1
[PATCH v4] nv50/ir: Handle OP_CVT when folding constant expressions
Folding for conversions: F32/64->(U16/32, S16/32) and (U16/32, S16/32)->F32
No piglit regressions observed on nv50 and nvc0!
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
---
V2: fix usage of wrong variable
V3: enable F64 support
V4:
- disable F64 support again
- handle s...
2004 May 13
1
question about dyn.load()
Hello, everybody,
I met a big problem. What I want is to use c code in R. I have load a test
code "conv.c" in R and run it successfully. However, in my real code, I use
matlab c library (Matrix Inverse function). After I use command "R CMD SHLIB"
to share library, I can not use "dyn.load" to load the object in
R. "undefined symbol: mclCleanupProtectedItems" alwa...
2017 Aug 02
3
[InstCombine] Simplification sometimes only transforms but doesn't simplify instruction, causing side effect in other pass
...------------ a.ll ----------------------------------
>> @a = global i64 0, align 8
>> @b = global i32 0, align 8
>>
>> define i32 @_Z25InternalUncompressAllTagsv(i16* %arrayidx) local_unnamed_addr {
>> entry:
>> %t1 = load i16, i16* %arrayidx, align 2
>> %conv.i = zext i16 %t1 to i32
>> %and.i = and i32 %conv.i, 255
>> %and7.i = and i32 %conv.i, 1792
>> %t3 = zext i32 %and7.i to i64
>> %t4 = load i64, i64* @a, align 8
>> %add.i = add i64 %t4, %t3
>> %cmp1 = icmp eq i64 %add.i, 1
>> %cmp2 = icmp ult i32 %an...
2012 Jun 13
2
[LLVMdev] Structs passed by value
...that none of the options yield the expected results for the input code (see below). Except for the indirect case, the function signature is changed to take each structure element. How can I modify LLVM to pass structures by value?
Thanks,
Javier
[Original Code]
struct myType {
long val;
};
int convert(struct myType in)
{
return (int)in.val;
}
[Expected Result]
define i32 @convert(%myType %in) nounwind readonly alwaysinline{
entry:
%in.addr = alloca %myType, align 8
store %myType %in, %myType* %in.addr, align 8
%0 = getelementptr inbounds %myType* %in.addr, i32 0, i32 0
%1 = load i6...
2008 Jul 18
2
[LLVMdev] Alignment of vectors
...mp = alloca <2 x float>, align 8 ; <<2 x float>*> [#uses=1]
%tmp1 = load float** %p ; <float*> [#uses=1]
%tmp2 = load i32* %offset ; <i32> [#uses=1]
%add.ptr = getelementptr float* %tmp1, i32 %tmp2 ; <float*>
[#uses=1]
%conv = bitcast float* %add.ptr to <2 x float>* ; <<2 x float>*>
[#uses=1]
%tmp3 = load <2 x float>* %conv ; <<2 x float>> [#uses=1]
store <2 x float> %tmp3, <2 x float>* %tmp
ret void
}
The problem is that the load into tmp3 seem...
2006 Jul 10
0
Strange acts_as_paranoid behavior
Using the acts_as_paranoid plugin with rails 1.1.4 (model also uses
acts_as_threaded and acts_as_taggable) and getting some unexplainable behavior.
The following tests:
assert_equal Conv.count, num
assert_equal Conv.count_with_deleted, CONVS_TOTAL
Produce the following SQL:
SQL (0.000000) SELECT count(*) AS count_all FROM convs WHERE ((
convs.deleted_at IS NULL OR convs.deleted_at > ''2006-07-09 19:46:18'' ) AND (
convs.deleted_at IS NULL OR convs.delet...
2005 Dec 21
0
Help with Krige.conv using linear models
A majority of my data makes a kriged map perfectly using an exponential
model for the semivariogram to fit my data and then going through the
commands variofit() to define the model and then krige.conv() to use the
model to predict values in a grid. But?one set of my data appears to be
linearly correlated for the first 5000 meters and not correlated beyond
that. I have been having problems using krige.conv() to get a decent
kriged map using the linear model. The code I am using from my data...
2011 Jul 19
1
Stacked Bar Plot in ggplot2
I'm trying to develop a stacked bar plot in R with ggplot2.
My data:
conv = c(10, 4.76, 17.14, 25, 26.47, 37.5, 20.83, 25.53, 32.5, 16.7, 27.33)
click = c(20, 42, 35, 28, 34, 48, 48, 47, 40, 30, 30)
date = c("July 7", "July 8", "July 9", "July 10", "July 11", "July 12",
"July 13",
"July 14",...
2008 Dec 05
1
Loop swith String replacement
...(Are other methods more appropriate?
Would a function be better?)
However i'm not sure in R how do do string replacement within the loop in
order to create unique dataset names based on the number of 'Groups' i have
Many thanks
Mike
my code is as follows:
no.groups <-names(table(Conv$Group))
for (i in length(Conv$no.groups))
{
groupi <- subset(Conv, Conv$Group == i)
}
Metal Secs cost Income stable Group
1 Chrome 60 14 3.3458 1 2
2 Chrome 51 10 1.8561 0 1
3 Chrome...
2009 Apr 14
5
.GSM -> .WAV (or ,MP3) Conversion
Hey there,
I'm trying to convert some call recordings from asterisk we have in .gsm
format to something I can pipe through ffmpeg - wav would be good, mp3
would be amazing!
I've been trying playing with sox but I don't seem to be getting too far
with
1239101491.30.gsm -ql -r 64000 -t wav 1239101491.30.conv.wav resam...
2012 Nov 07
5
Calling R object from R function
Hi,
Can you please help me with this please?
What I am trying to do is call a vector from R function and used in the new
function
So I create 4 functions with these arguments
M11 <- function(TrainData,TestData,mdat,nsam) {
ls <- list()
I have few statments one of them is
vectx <- c(,1,2,3,4,5,6,6)
vectz <- c(12,34,5,6,78,9,90)
and then................
ls(vectx=vtecx,vectz=vectz)