Displaying 20 results from an estimated 8000 matches similar to: "problem with function"
2011 Dec 22
2
Decoding only a certain frame results in different values than when decoding the entire file
To make it complete, here is the code that I am using to encode a large
file:
int __stdcall SpxEncode(unsigned char* inBuf, unsigned char* outBuf,
unsigned int inlen)
{
//char *testFile;
//FILE *ftest;
//testFile = "test";
//ftest = fopen(testFile, "wb");
//fwrite(inBuf,1,inlen,ftest);
//take every 320 bytes
//copy every short to float
2012 Sep 24
4
serial subtraction within a vector
Hello,
I have a vector (numeric) v-> c(a,b,c,d,e) and I want to create the vector
n->c(b-a,c-b,d-c,e-d). How can I do that?
Thank you
Hermann
[[alternative HTML version deleted]]
2012 Sep 15
2
qplot: plotting precipitation data
Dear list,
I wish to plot chromatin precipitation data: I would like to have a
rectangles (x:end-start, y:peak) but I do not have an idea how to define x
(in terms of qplot syntax) and to choose the correct geom.
mydata is a subset of a larger file.
> mydata
chrom start end peak
1 chr11 5291000 5291926 8
2 chr11 10988025 10988526 7
3 chr11 11767950 11768676 8
4
2013 Jan 03
5
count appearence of zero in a vector
Hello,
I wish to count how often zero (0) appears in the vector test.
test
[1] 1 1 1 1 1 1 2 1 1 1 0 2 0 1 1 0 0 0 1 1 1 0 1 2 1 1 1 1 1 1
I think of something like ...
> sapply (test, function (x) if (x==0 ...
... but actually I dont know how to carry on.
Could anybody give me a hint?
Thanks Hermann
[[alternative HTML version deleted]]
2011 Dec 21
3
Decoding only a certain frame results in different values than when decoding the entire file
Sorry, it seems I have only replied to Lakhdar, not to the newsgroup.
Below is my reply to Lakhdar, and I would like to make it more clear
now, using some pseudo values for simplicity:
I read bytes 1 to 124 from my encoded spx file.
I decode themt and get the values:
---Frame 1----
-293
-8234
2134
17
---Frame 2----
-9323
-732
189
2329
Both frames are just perfect as I need them.
But now when I
2012 Sep 05
2
Installing lumi and hdrcde
To whom it may concern.
As I would like to analyse some array data I was keen on downloading the
lumi package that depends obviously on hdrcde that is not available for r
2.12.1. I did not find instructions to solve or circumvent this problem.
Installing hdrcde by hand did not work either. It was not detected by
> (.packages(all.available=TRUE))
if installed in the R library.
Thanks
Hermann
2009 Jul 23
4
remove multiple columns by name from dataframe
Hi there,
I'm trying to remove multiple columns by name from a data.frame. As a
result I need to get back the modified data.frame without the removed
columns. My columns I want to delete are listed in a vector called
"delete".
data <- read.csv2("data.csv")
delete <- c("col1", "col2", "col3")
newData <- subset(data, select =
2013 Mar 29
3
From a vector with characters to binary information
Hello,
I would like to transform a character vector into a "binary" vector
("keine" and " " become 0 and the rest 1).
> dput (scm)
c("keine", " ", "keine", "Erstgradverw.", "Mutter", "Erstgradverw.",
"Erstgradverw.", "keine", " ", "Vater",
2012 Dec 17
2
looping through spatial points and getting counts of spatial points in spatial grid in R
Hi,
I am stuck in a looping problem. It might be an easy problem for experienced R users but I have been unable to do it. Any kind of help or advice will be great appreciated.
I am creating a spatial grid and have a list of spatial points in a folder. I can read the spatial points separately and get a count of the points in the spatial grid in R. The output should be a table showing the counts of
2012 Sep 10
3
plot: x and y chromosomes are missing
Hello,
I have a list with gene names, fold changes (=expression level) and
chromosomes.
Names fold change chromosome
hz 1.5 2
If I plot fold change versus chromosome (or vice versa):
plot (ch, fc)
I see only the chromosomes with numbers but not those with letter (x and
y). What can I do?
A second question:
How can I add a single line in that plot at a certain
2013 Oct 03
1
prcomp - surprising structure
Hello,
I did a pca with over 200000 snps for 340 observations (ids). If I plot the
eigenvectors (called rotation in prcomp) 2,3 and 4 (e.g. plot
(rotation[,2]) I see a strange "column" in my data (see attachment). I
suggest it is an artefact (but of what?).
Suggestion:
I used prcomp this way: prcomp (mat), where mat is a matrix with the column
means already substracted followed by a
2013 Nov 08
2
making chains from pairs
Hello,
having a data frame like test with pairs of characters I would like to
create chains. For instance from the pairs A/B and B/I you get the vector A
B I. It is like jumping from one pair to the next related pair. So for my
example test you should get:
A B F G H I
C F I K
D L M N O P
> test
V1 V2
1 A B
2 A F
3 A G
4 A H
5 B F
6 B I
7 C F
8 C I
9 C K
10 D L
2012 Nov 05
2
fusion of overlapping intervals
Hello,
I have start and end coordinates from different experiments (DNase
hypersensitivity data) and now I would like to combine overlapping
intervals. For instance (see my test data below) (2) 30-52 and (3) 49-101
are combined to 30-101. But 49-101 and 70-103 would not be combined because
they are on different chromosomes (chr a and chr b).
Does anybody have an idea?
Thanks
Hermann
> df
2011 Apr 12
2
advisory file locks in linux - do they work?
Hi - I'm trying to verify if OpenSSH/SFTP will in fact lock files with
advisory file locking in Linux. I can test locking with the linux
"flock" command to verify that file locking does work - but when I
upload or download a file with SFTP it will not detect a lock. I'm
asking about Linux specifically because about a year ago I was doing a
similar process in Solaris 9 and
2020 Jan 15
4
[semi-OT] C7 Possible bug but I can't determine what tool has the problem
Hi all,
I'm writing a script that uses rsync to sync 2 dirs on C7.
I noticed a strange behaviour.
I have 2 dir: src and dest. In src dir I generate a testfile with "dd
if=/dev/zero of=testfile bs=1M count=100" and when I run "du -h
testfile" I get the correct result.
Then I sync src/ to dest/ using "rsync -avS? src/ dest/", all ok but
when I run "du -h
2011 Mar 05
1
file mode lost in file.copy()?
Hi,
Recently I noticed file.copy() would discard the file mode
information. Is this the expected behaviour or a bug for file.copy()?
> file.create('testfile')
[1] TRUE
> file.info('testfile')
size isdir mode mtime ctime
testfile 0 FALSE 644 2011-03-05 17:06:39 2011-03-05 17:06:39
atime uid gid uname grname
2011 Mar 05
1
file mode lost in file.copy()?
Hi,
Recently I noticed file.copy() would discard the file mode
information. Is this the expected behaviour or a bug for file.copy()?
> file.create('testfile')
[1] TRUE
> file.info('testfile')
size isdir mode mtime ctime
testfile 0 FALSE 644 2011-03-05 17:06:39 2011-03-05 17:06:39
atime uid gid uname grname
2007 Nov 29
2
Overriding resources in a define in a module - can''t get syntax right
Maybe it works, maybe it doesn''t, but I sure as hell can''t make it work.
I get stuck with
"Could not find object(s)" whatever I do
This is my module init.pp
class ztest::setup {
notice "MAIN SETUP CLASS"
file { directfile:
path => "/etc/directfile",
owner => root, group => root, mode => 0644,
content
2011 Jun 03
4
Problem using read.xls - Everything converted to factors
Hallo,
I would like to use to read.xls function from the gdata package to read
data from Microsoft Excel files but I experienced a problem: For example
I used the following code:
testfile<-read.xls("/home/.../wsjecon0603.xls", #file path
header=F,
dec=",",
na.strings="n.a.",
skip=5,
sheet=2,
2020 Jan 15
2
[semi-OT] C7 Possible bug but I can't determine what tool has the problem
Il 15/01/20 17:51, Jon Pruente ha scritto:
> On Wed, Jan 15, 2020 at 10:18 AM Alessandro Baggi <
> alessandro.baggi at gmail.com> wrote:
>
>> I made several test to see what happens and noticed that removing -S
>> (--sparse) from rsync command problem does not occour.
>> In another test, thinking about a problem on 0ed file, I tried file
>> generation using