[R] using boost in R package

2008-11-17 Thread Vidhu Choudhary
Hi All,
I am making a R package which is using a boost c++ library. Can some
suggest how can I compile the dll in windows  using boost. It makes a
package but during installation in fails to link  boost and give
errors
Any help will be useful

Thanks
Vidhu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Making R Package (how to include a library)

2008-11-12 Thread Vidhu Choudhary
Hi All,
I am making a R package which uses some C code. and existing library.My src
folder has some .c files. and a Makevars.in
Makevars.in contains
export PKG_LIBS=-L. -lbz2
R CMD SHLIB bed2vector.C
R CMD SHLIB wdl.C
R CMD SHLIB peaks.C
R CMD SHLIB cdensum.c

When I try library(libraryname). It gives me error  undefined symbol:
BZ2_bzRead
Can anyone please suggest how to include a exiting library along with .c
files to make a Rpackage

thank you
vidhu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Reading the data from specific columns

2008-07-22 Thread Vidhu Choudhary
Hi All,
I have a huge tab separated file which a many columns. I want to read only
few specific columns in R object. There are no column names/headers in the
file. Can someone please suggest how can I do that. I checked the help of
read.delim  but wasnt able to find such option
Thank you
Reagards
Vidhu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] RSQLite maximum table size

2008-07-16 Thread Vidhu Choudhary
Hi All,
I am trying to make write a table in RSQLite. And I get the error mentioned
below

 mat-as.data.frame(matrix(rnorm(n=24400),nrow=244000,ncol=1000))
 dbWriteTable(con, array, mat)
[1] FALSE
*Warning message:
In value[[3]](cond) :
  RS-DBI driver: (error in statement: too many SQL variables)*

Can someone please tell me what is maximum size of a table( max number of
rows and cols) we can have in RSQLite  and how big the database can grow

Thank you
Regards
Vidhu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Possible cause of the error: unknown c standard 'gnu99'

2008-06-23 Thread Vidhu Choudhary
Hi All,
I am getting error unknown c standard 'gnu99'. I have attached the screen
shot. Can anyone suggest what is causing this error

thank you
Best regards
Vidhu
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Error in `[.matrix.coo`(x, rw, cl) : Subscripts out of bound

2008-05-20 Thread Vidhu Choudhary
Hi All,
I am facing a strange problem.  I am making a R Package that internally run
various packages and summarizes the results from them.
I am getting this error from the piece of code written below. The text in
red color is throwing
Error in `[.matrix.coo`(x, rw, cl) : Subscripts out of bound
Value of m is 99
This code works fine when I tested it. But money I make  library it gives me
error.
I have attached the file names messages.txt which contains the
warnings/messages generated while making R package.
I am out of ideas
Kindly suggest something

regards
vidhu

`sm.quantreg` -
function(y, lambda = 1.0, tau = 0.5, interpolate = FALSE)  {
  nona - !is.na(y)

  ## Sparse matrices: E, D, and B
  if(!interpolate)  {
y.nona - y[nona]
m - length(y.nona)  *1.0
E - as.matrix.csr(0,m,m)
diag(E) - 1
*D - diff(E)*
B - rbind(E, lambda * D)
   ystar - c(y.nona, rep(0,m-1))

  }else  {
## interpolate missing values via weighting
y[!nona] - 0
m - length(y) *1.0
E - as.matrix.csr(0,m,m)

diag(E) - 1
D - diff(E)
tmp - as.matrix.csr(0,m,m)
diag(tmp) - as.numeric(nona)
B - rbind(tmp, lambda * D)
ystar - c(y, rep(0,m-1))
  }

  ## use sparse matrices and accompanying mathematical operations
  cat (before try\n)
  try(myrq - rq.fit.sfn(as.matrix.csr(B), ystar, tau))
  cat (after try\n)
  if(exists(myrq))  {
if(!interpolate)  {
  ys - rep(NA, length(y))
  ys[nona] - myrq$coef
}else  {
  ys - myrq$coef
}
  }else  {
cat(Error triggered within Quantreg algorithm!\n)
ys - NULL
  }
  return(ys)
}

##
C:\Documents and Settings\Administrator\My DocumentsR CMD INSTALL t1
installing to 'c:/R/R-2.6.2/library'


-- Making package t1 
  adding build stamp to DESCRIPTION
  installing NAMESPACE file and metadata
  making DLL ...
gcc-sjlj  -std=gnu99  -IC:/R/R-2.6.2/include -O3 -Wall  -c CGHseg_rewrite.c
-o CGHseg_rewrite.o
gcc-sjlj  -std=gnu99  -IC:/R/R-2.6.2/include -O3 -Wall  -c rowMedians.c -o r
owMedians.o
gcc-sjlj  -std=gnu99  -IC:/R/R-2.6.2/include -O3 -Wall  -c runavg.c -o runav
g.o
windres --preprocessor=gcc-sjlj -E -xc -DRC_INVOKED -I C:/R/R-2.6.2/include  -
i t1_res.rc -o t1_res.o
gcc-sjlj  -std=gnu99  -shared -s  -o t1.dll t1.def CGHseg_rewrite.o rowMedians.o
 runavg.o t1_res.o  -LC:/R/R-2.6.2/bin-lR
  ... DLL made
  installing DLL
  installing R files
  installing data files
  installing man source files
  installing indices
  not zipping data
  installing help
  Building/Updating help pages for package 't1'
 Formats: text html latex example chm
  checkUploadFileFormat texthtmllatex   example
  runAnalysis   texthtmllatex   example
  runCGHAnalysistexthtmllatex   example
  preparing package t1 for lazy loading
Loading required package: waveslim
Loading required package: quantreg
Loading required package: SparseM
Loading required package: snapCGH
Loading required package: limma
Loading required package: tilingArray
Loading required package: Biobase
Loading required package: tools

Welcome to Bioconductor

  Vignettes contain introductory material. To view, type
  'openVignette()'. To cite Bioconductor, see
  'citation(Biobase)' and for packages 'citation(pkgname)'.

Loading required package: affy
Loading required package: affyio
Loading required package: preprocessCore

Attaching package: 'affy'


The following object(s) are masked from package:waveslim :

 pm

Loading required package: RColorBrewer
Loading required package: grid
Loading required package: strucchange
Loading required package: zoo
Loading required package: sandwich
Loading required package: vsn
Loading required package: genefilter
Loading required package: survival
Loading required package: splines

Attaching package: 'survival'


The following object(s) are masked from package:quantreg :

 untangle.specials

Loading required package: geneplotter
Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: DBI
Loading required package: RSQLite
Loading required package: xtable
Loading required package: lattice
KernSmooth 2.22 installed
Copyright M. P. Wand 1997
Loading required package: pixmap
Loading required package: DNAcopy

Attaching package: 'DNAcopy'


The following object(s) are masked from package:tilingArray :

 segment

Loading required package: GLAD
Loading required package: aws
Loading required package: tcltk
Loading Tcl/Tk interface ... done
Loading required package: cluster
Loading required package: aCGH
Loading required package: multtest
Loading required package: sma

Attaching package: 'aCGH'


The following object(s) are masked from package:stats :

 heatmap


Attaching package: 'snapCGH'


The following object(s) are masked from 

Re: [R] Error while making R package

2008-05-09 Thread Vidhu Choudhary
Hi All,
*I am still facing the problems in making R package on windows. *


-- Making package t1 
  adding build stamp to DESCRIPTION
  installing NAMESPACE file and metadata
  making DLL ...
making CGHseg_rewrite.d from CGHseg_rewrite.c
making rowMedians.d from rowMedians.c
making runavg.d from runavg.c
gcc-sjlj  -std=gnu99  -IC:/R/R-2.6.2/include -O3 -Wall  -c
CGHseg_rewrite.c -o CGHseg_rewrite.o
gcc-sjlj  -std=gnu99  -IC:/R/R-2.6.2/include -O3 -Wall  -c rowMedians.c
-o rowMedians.o
gcc-sjlj  -std=gnu99  -IC:/R/R-2.6.2/include -O3 -Wall  -c runavg.c -o
runavg.o
windres --preprocessor=gcc-sjlj -E -xc -DRC_INVOKED -I
C:/R/R-2.6.2/include  -i t1_res.rc -o t1_res.
o
gcc-sjlj  -std=gnu99  -shared -s  -o t1.dll t1.def CGHseg_rewrite.o
rowMedians.o runavg.o t1_res.o  -L
C:/R/R-2.6.2/bin-lR
  ... DLL made
  installing DLL
  installing R files
  installing data files
rm: failed to get attributes of `/': No such file or directory
make[2]: *** [c:/R/R-2.6.2/library/t1/data] Error 1
make[1]: *** [all] Error 2
make: *** [pkg-t1] Error 2
*** Installation of t1 failed ***

Removing 'c:/R/R-2.6.2/library/t1'
Restoring previous 'c:/R/R-2.6.2/library/t1'

*I have made registry changes also as per the link :
https://stat.ethz.ch/pipermail/r-devel/2008-January/048059.html
*
*I can successfully make the package on Linux. *

But when I try to R CMD INSTALL on windows( package made in linux) I get the
same error of
rm: failed to get attributes of `/': No such file or directory
make[2]: *** [c:/R/R-2.6.2/library/t1/data] Error 1

I am attaching the .tar file made on windows2000


Thank you
Best Regards
Vidhu
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Error while making R package

2008-05-01 Thread Vidhu Choudhary
Hi All,
I am trying to make R package using R 2.6.2
And I am getting following error.

When I give R CMD check t1\

-- Making package t1 
  adding build stamp to DESCRIPTION
  making DLL ...
making CGHseg_rewrite.d from CGHseg_rewrite.c
making rowMedians.d from rowMedians.c
making runavg.d from runavg.c
gcc-sjlj  -std=gnu99  -Ic:/R/R-2.6.2/include -O3 -Wall  -c
CGHseg_rewrite.c -o CGHseg_rewrite.o
gcc-sjlj  -std=gnu99  -Ic:/R/R-2.6.2/include -O3 -Wall  -c rowMedians.c
-o rowMedians.o
gcc-sjlj  -std=gnu99  -Ic:/R/R-2.6.2/include -O3 -Wall  -c runavg.c -o
runavg.o
windres --preprocessor=gcc-sjlj -E -xc -DRC_INVOKED -I
c:/R/R-2.6.2/include  -i t1_res.rc -o t1_res.o
gcc-sjlj  -std=gnu99  -shared -s  -o t1.dll t1.def CGHseg_rewrite.o
rowMedians.o runavg.o t1_res.o  -Lc:/R/R-2.6.2/bin-lR
  ... DLL made
  installing DLL
  installing R files
  installing data files
rm: failed to get attributes of `/': No such file or directory
make[2]: *** [C:/Vidhu/CGH/RPackage/t1.Rcheck/t1/data] Error 1
make[1]: *** [all] Error 2
make: *** [pkg-t1] Error 2
*** Installation of t1 failed ***


Can you please suggest what could be the probable cause of the error

Thank you
Vidhu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to stop buffering of cat

2008-04-30 Thread Vidhu Choudhary
Hi All,
My R code takes very long time to finish the processing. I want to see at
what stage the script is running. So I wrote some output messages using cat.
But instead of displaying the cat messages at different stages they are
buffered and displayed in the end when entire processing is done.
Can you please suggest how to stop this buffering or some alternative way to
display messages

Thank you
Vidhu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to hide the warnings

2008-04-29 Thread Vidhu Choudhary
Hi All,
I want to hide all the system(R) generated warning messages and want only
the messages from my script should be shown when i run myscript.R
Can you please suggest how can I hide the warnings

Thank you
Vidhu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] c code working in linux and hanging in windows

2008-04-29 Thread Vidhu Choudhary
Hi All,
I am calling some c code from R.
It successfully makes the dll and .so files.
When I run .so in Linux is works prefect but hangs in windows. Though the
dll loads but it never returns back from the c function

Can you please suggest the possible cause of this

thank you
vidhu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] FASeg

2008-04-25 Thread Vidhu Choudhary
Hi All,
I was using FASeg package. Now when I am trying to install this library I
get the message
Warning message:
package 'FASeg' is not available

Can someone please suggest something.

Thank you
vidhu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] making a dll for windows eviornment for R

2008-04-25 Thread Vidhu Choudhary
Hi All,
 I have a .c file and I need to make a dll so that it could be called by R.
I have successfully made .so from .c file and its working great. But i have
no clue of making dll. I tried googling for help ...but not much of use

Please suggest something

regards
Vidhu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] read table not reading lines containing single quotes

2008-04-09 Thread Vidhu Choudhary
Hi,
* I am using read.table command as follow
kegg-read.table(c:/IDs.tab,header =TRUE,quote= ', sep=\t) *
 Fragment of file is as follow:
ID  Pathway
04916Melanogenesis
04920Adipocytokine signaling pathway
04930Type II diabetes mellitus
04940Type I diabetes mellitus
04950Maturity onset diabetes of the young
05010Alzheimer's disease
05020Parkinson's disease
05030Amyotrophic lateral sclerosis (ALS)
05040Huntington's disease
05050Dentatorubropallidoluysian atrophy (DRPLA)

*It doesnot read from Alzheimer's disease. Due the single qoutes in it. Can
you please suggest something so that I can
read full file.
*
Thank you
Vidhu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Cannot run R from command prompt

2008-04-04 Thread Vidhu Choudhary
Hello,
I have installed R 2.6 on windows 2000 and now from the command prompt when
I type R  it show
 'R' is not recognized as an internal or external command,
operable program or batch file.

If I change the path to C:\R\R-2.6.2\bin and then type R it runs fine.
I have changed my envionment variable Path to C:\R\R-2.6.2\bin;
Still its not working. Can you please give some suggestion

Thank you
Vidhu

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Error in plot.new() : figure margins too large

2008-01-16 Thread Vidhu Choudhary
Hi
I am getting error :
Error in plot.new() : figure margins too large
Can you please help
-code is 
temp - seq(550/2, 2200, 550/2)
sV2 - c(1, 1+temp[-length(temp)])
eV2 - temp
i=1
  bitmap(paste(c:/vidhu/poster/poster_56half_2, LETTERS[i], .png, sep =
), png256,width = 55.5, height = 8.875, res = 300)
  par(mfrow = c(28,1), mar = c(0.5,3,0.5,0.5), mgp = c(2,0.65,0))
for(i in 1:length(sV2))  {

  cat(i = , i, \n, sep = )
  if (i%%2)
  {
  pSL(sV2[i], eV2[i], 5)}

}
dev.off()
windows()

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.