[R] mzR and Rcpp version bug

2014-04-02 Thread Zsurzsa Laszlo
Good morning everyone,


I'm having the following error when I try to load the *mzR* libary. Does
someone have a clue where to search for a solution. I tried to re-install *mzR
*and *Rcpp* also, but with no effect.

-
 library(mzR)
Lade nötiges Paket: Rcpp
Error : .onLoad in loadNamespace() für 'mzR' fehlgeschlagen, Details:
  Aufruf: value[[3L]](cond)
  Fehler: failed to load module Ramp from package mzR
kann Vektor der Größe 13.2 GB nicht allozieren
Zusätzlich: Warnmeldungen:
1: In fun(libname, pkgname) :
   mzR has been built against a different Rcpp version
 than is installed on your system. This might lead to errors
 when loading mzR. If you encounter such issues, please send
 a report, including the output of sessionInfo() to the Bioc
 mailing list -- http://www.bioconductor.org/help/mailing-list.
2: In Module(m, pkg, mustStart = TRUE) :
  Reached total allocation of 8183Mb: see help(memory.size)
3: In Module(m, pkg, mustStart = TRUE) :
  Reached total allocation of 8183Mb: see help(memory.size)
4: In Module(m, pkg, mustStart = TRUE) :
  Reached total allocation of 8183Mb: see help(memory.size)
5: In Module(m, pkg, mustStart = TRUE) :
  Reached total allocation of 8183Mb: see help(memory.size)
Fehler: Laden von Paket oder Namensraum für 'mzR' fehlgeschlagen
 sessionInfo()
R version 3.0.3 (2014-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252
 LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
[1] Rcpp_0.11.1

loaded via a namespace (and not attached):
[1] Biobase_2.20.1 BiocGenerics_0.6.0 parallel_3.0.3
-


Best Regards, László-András Zsurzsa
Master of Informatics Student,
Technical University Munich, Germany

[[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.


Re: [R] Shiny - can one create one RUN button?

2013-09-13 Thread Zsurzsa Laszlo
Maybe this link can help you:

http://rstudio.github.io/shiny/tutorial/#more-widgets

This is an example with submit button.

-
- László-András Zsurzsa,-
- Msc. Infromatics, Technical University Munich, Germany -
- Scientific Employee, TUM -
-


On Fri, Sep 13, 2013 at 12:21 AM, Dimitri Liakhovitski 
dimitri.liakhovit...@gmail.com wrote:

 Hello!

 I am learning to use Shiny.

 Imagine my ui.r file contains two different inputs that I can change:

 sidebarPanel(
   numericInput(input1, My input 1:, 5),
   numericInput(input2, My input 2:, 10)
 )


 And I am generating (in server.r file) the sum of those two using
 reactive({...

 If I change just one of the inputs, I immediately get the changed result -
 because the whole expression is reactive.

 Question: is there any way to delay the production of the output until one
 wants it to be produced (i.e., only after one selected all the correct
 inputs needed) and have something like a RUN button?

 Thank you!

 --
 Dimitri Liakhovitski

 [[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.


[[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.


Re: [R] XLSX package + Excel creation question

2013-09-04 Thread Zsurzsa Laszlo
http://stackoverflow.com/questions/18511249/excel-cell-coloring-using-xlsx

This is the initial post on stackoverflow. Please look at this maybe I'm
clearer here.

Thank you in advance,

-
- László-András Zsurzsa,-
- Msc. Infromatics, Technical University Munich, Germany -
- Scientific Employee, TUM -
-


On Fri, Aug 30, 2013 at 3:48 PM, jim holtman jholt...@gmail.com wrote:

 You can also look at the XLConnect package.
 Jim Holtman
 Data Munger Guru

 What is the problem that you are trying to solve?
 Tell me what you want to do, not how you want to do it.


 On Thu, Aug 29, 2013 at 9:40 AM, Zsurzsa Laszlo zsurzsalas...@gmail.com
 wrote:
  I understand you response but it does not solve the problem. I'am aware
  that one can simply color every cell in an excel file by using his own
  algorithm.
 
  The question was if I can write my data to a *single* cells and use
  different formatting for every piece of data.
 
 
 -
  - László-András Zsurzsa,-
  - Msc. Infromatics, Technical University Munich, Germany -
  - Scientific Employee, TUM -
 
 -
 
 
  On Thu, Aug 29, 2013 at 3:36 PM, Rainer Hurling rhur...@gwdg.de wrote:
 
  Am 29.08.2013 15:03 (UTC+1) schrieb Zsurzsa Laszlo:
   First of all thank you for the quick resposen.
  
   I know I can color and set up every cell. I will take a look again *
   CellStyle* but is it possbile for example to write an array to a
 single
   cell that has different colors for some data. Basically the color
 depends
   on the data.
 
  As far as I know there is no ready to use functionality to mask groups
  of selected cells. You have to write your own function, which selects
  the right cells and changes their style with setCellStyle(cell,
 cellStyle).
 
  Some hints are given in the examples section of ?CellStyle.
 
  
  
 
 -
   - László-András Zsurzsa,
-
   - Msc. Infromatics, Technical University Munich, Germany -
   - Scientific Employee, TUM
   -
  
 
 -
  
  
   On Thu, Aug 29, 2013 at 2:55 PM, Rainer Hurling rhur...@gwdg.de
 wrote:
  
   Am 29.08.2013 12:08 (UTC+1) schrieb Zsurzsa Laszlo:
   Dear R users,
  
   I have a question about the xlsx package. It's possible to create
 excel
   files and color cells and etc.
  
   yes, with package xlsx you can colourize you data sheets, even the
   fonts. See for example ?CellStyle .
  
   A good demonstration of the capabilities is on
  
  
 
 http://tradeblotter.wordpress.com/2013/05/02/writing-from-r-to-excel-with-xlsx/
  
  
   My question would be that is it possible to color only some part of
 the
   data hold in a cell. Let's assume I've got the following data :
   167,153,120,100 and I want to color to red everything that is bigger
  then
   120. How can I achive this using R.
  
   Example file setup with a few lines in attachment. (SEL_MASS column
 can
   be
   used for example)
  
   Attachment missing ...
  
   HTH,
   Rainer
  
  
   Thank you in advance,
  
  
 
 -
   - László-András Zsurzsa,
   -
   - Msc. Infromatics, Technical University Munich, Germany -
   - Scientific Employee, TUM
  -
  
  
 
 -
  
  
 [[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.
  
 
 
  [[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.
 


[[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.


Re: [R] XLSX package + Excel creation question

2013-09-04 Thread Zsurzsa Laszlo
Thank you for the reply, I wount post any other link anymore. I did not
know it's not allowed.

-
- László-András Zsurzsa,-
- Msc. Infromatics, Technical University Munich, Germany -
- Scientific Employee, TUM -
-


On Wed, Sep 4, 2013 at 1:22 PM, Keith Jewell
keith.jew...@campdenbri.co.ukwrote:

 I'll skip over the courtesy implications of double posting/pointing to
 stackoverflow.

 The stackoverflow thread makes it look as if you need to learn more Excel.
 Do you really not know what an Excel template is?

 It sounds as if you want what Excel calls conditional formatting which
 you can specify as custom number formats, see http://www.ozgrid.com/Excel/
 **CustomFormats.htm http://www.ozgrid.com/Excel/CustomFormats.htm.

 Excel's help on custom number formats says:
 
 To specify number formats that will be applied only if a number meets a
 condition that you specify, enclose the condition in square brackets. The
 condition consists of a comparison operator (comparison operator: A sign
 that is used in comparison criteria to compare two values. Operators
 include: = Equal to,  Greater than,  Less than, = Greater than or equal
 to, = Less than or equal to, and  Not equal to.) and a value. For
 example, the following format displays numbers that are less than or equal
 to 100 in a red font and numbers that are greater than 100 in a blue font.
 [Red][=100];[Blue][100]
 --

 R package xlsx allows such formats (?DataFormat) as does R package
 XLConnect (?setDataFormat).

 HTH

 Keith J


 On 04/09/2013 09:57, Zsurzsa Laszlo wrote:

 http://stackoverflow.com/**questions/18511249/excel-cell-**
 coloring-using-xlsxhttp://stackoverflow.com/questions/18511249/excel-cell-coloring-using-xlsx

 This is the initial post on stackoverflow. Please look at this maybe I'm
 clearer here.

 Thank you in advance,

 --**--**
 -
 - László-András Zsurzsa,-
 - Msc. Infromatics, Technical University Munich, Germany -
 - Scientific Employee, TUM -
 --**--**
 -


 On Fri, Aug 30, 2013 at 3:48 PM, jim holtmanjholt...@gmail.com  wrote:

  You can also look at the XLConnect package.
 Jim Holtman
 Data Munger Guru

 What is the problem that you are trying to solve?
 Tell me what you want to do, not how you want to do it.


 On Thu, Aug 29, 2013 at 9:40 AM, Zsurzsa Laszlozsurzsalas...@gmail.com*
 *
 wrote:

 I understand you response but it does not solve the problem. I'am aware
 that one can simply color every cell in an excel file by using his own
 algorithm.

 The question was if I can write my data to a *single* cells and use
 different formatting for every piece of data.


  --**--**
 -

 - László-András Zsurzsa,
  -
 - Msc. Infromatics, Technical University Munich, Germany -
 - Scientific Employee, TUM -

  --**--**
 -



 On Thu, Aug 29, 2013 at 3:36 PM, Rainer Hurlingrhur...@gwdg.de
  wrote:

  Am 29.08.2013 15:03 (UTC+1) schrieb Zsurzsa Laszlo:

 First of all thank you for the quick resposen.

 I know I can color and set up every cell. I will take a look again *
 CellStyle* but is it possbile for example to write an array to a

 single

 cell that has different colors for some data. Basically the color

 depends

 on the data.


 As far as I know there is no ready to use functionality to mask groups
 of selected cells. You have to write your own function, which selects
 the right cells and changes their style with setCellStyle(cell,

 cellStyle).


 Some hints are given in the examples section of ?CellStyle.




  --**--**
 -

 - László-András Zsurzsa,

 -

 - Msc. Infromatics, Technical University Munich, Germany -
 - Scientific Employee, TUM

-



  --**--**
 -



 On Thu, Aug 29, 2013 at 2:55 PM, Rainer Hurlingrhur...@gwdg.de

 wrote:


  Am 29.08.2013 12:08 (UTC+1) schrieb Zsurzsa Laszlo:

 Dear R users,

 I have a question about the xlsx package. It's possible to create

 excel

 files and color cells and etc.


 yes, with package xlsx you can colourize you data sheets, even the
 fonts. See for example ?CellStyle .

 A good demonstration of the capabilities is on



  http://tradeblotter.wordpress.**com/2013/05/02/writing-from

Re: [R] Help If

2013-08-29 Thread Zsurzsa Laszlo
Hey

if  (( (1==1)  (2==2) ) || (3==3)) {  print( hello world) }

-
- László-András Zsurzsa,-
- Msc. Infromatics, Technical University Munich, Germany -
- Scientific Employee, TUM -
-


On Thu, Aug 29, 2013 at 11:11 AM, Zsurzsa Laszlo zsurzsalas...@gmail.comwrote:

 Hey

 if  (( (1==1)  (2==2) ) || (3==3)) {  print( hello world) }


 -
 - László-András Zsurzsa,-
 - Msc. Infromatics, Technical University Munich, Germany -
 - Scientific Employee, TUM -

 -


 On Thu, Aug 29, 2013 at 10:16 AM, Mª Teresa Martinez Soriano 
 teresama...@hotmail.com wrote:

 Hi to everyone and sorry for my question,  I would like to use IF in an
 example like this:


 If((condition1 and condition2) Or (condition 3 and condition4)) {print
 uhvef}


 BUt I don´t know how to write it correctly,

 Thanks in advance
 [[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.




[[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] XLSX package + Excel creation question

2013-08-29 Thread Zsurzsa Laszlo
Dear R users,


I have a question about the xlsx package. It's possible to create excel
files and color cells and etc.

My question would be that is it possible to color only some part of the
data hold in a cell. Let's assume I've got the following data :
167,153,120,100 and I want to color to red everything that is bigger then
120. How can I achive this using R.

Example file setup with a few lines in attachment. (SEL_MASS column can be
used for example)




Thank you in advance,
-
- László-András Zsurzsa,-
- Msc. Infromatics, Technical University Munich, Germany -
- Scientific Employee, TUM -
-
__
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.


Re: [R] XLSX package + Excel creation question

2013-08-29 Thread Zsurzsa Laszlo
First of all thank you for the quick resposen.

I know I can color and set up every cell. I will take a look again *
CellStyle* but is it possbile for example to write an array to a single
cell that has different colors for some data. Basically the color depends
on the data.

-
- László-András Zsurzsa,-
- Msc. Infromatics, Technical University Munich, Germany -
- Scientific Employee, TUM -
-


On Thu, Aug 29, 2013 at 2:55 PM, Rainer Hurling rhur...@gwdg.de wrote:

 Am 29.08.2013 12:08 (UTC+1) schrieb Zsurzsa Laszlo:
  Dear R users,
 
  I have a question about the xlsx package. It's possible to create excel
  files and color cells and etc.

 yes, with package xlsx you can colourize you data sheets, even the
 fonts. See for example ?CellStyle .

 A good demonstration of the capabilities is on

 http://tradeblotter.wordpress.com/2013/05/02/writing-from-r-to-excel-with-xlsx/

 
  My question would be that is it possible to color only some part of the
  data hold in a cell. Let's assume I've got the following data :
  167,153,120,100 and I want to color to red everything that is bigger then
  120. How can I achive this using R.
 
  Example file setup with a few lines in attachment. (SEL_MASS column can
 be
  used for example)

 Attachment missing ...

 HTH,
 Rainer

 
  Thank you in advance,
 
 -
  - László-András Zsurzsa,-
  - Msc. Infromatics, Technical University Munich, Germany -
  - Scientific Employee, TUM -
 
 -


[[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.


Re: [R] XLSX package + Excel creation question

2013-08-29 Thread Zsurzsa Laszlo
I understand you response but it does not solve the problem. I'am aware
that one can simply color every cell in an excel file by using his own
algorithm.

The question was if I can write my data to a *single* cells and use
different formatting for every piece of data.

-
- László-András Zsurzsa,-
- Msc. Infromatics, Technical University Munich, Germany -
- Scientific Employee, TUM -
-


On Thu, Aug 29, 2013 at 3:36 PM, Rainer Hurling rhur...@gwdg.de wrote:

 Am 29.08.2013 15:03 (UTC+1) schrieb Zsurzsa Laszlo:
  First of all thank you for the quick resposen.
 
  I know I can color and set up every cell. I will take a look again *
  CellStyle* but is it possbile for example to write an array to a single
  cell that has different colors for some data. Basically the color depends
  on the data.

 As far as I know there is no ready to use functionality to mask groups
 of selected cells. You have to write your own function, which selects
 the right cells and changes their style with setCellStyle(cell, cellStyle).

 Some hints are given in the examples section of ?CellStyle.

 
 
 -
  - László-András Zsurzsa,-
  - Msc. Infromatics, Technical University Munich, Germany -
  - Scientific Employee, TUM -
 
 -
 
 
  On Thu, Aug 29, 2013 at 2:55 PM, Rainer Hurling rhur...@gwdg.de wrote:
 
  Am 29.08.2013 12:08 (UTC+1) schrieb Zsurzsa Laszlo:
  Dear R users,
 
  I have a question about the xlsx package. It's possible to create excel
  files and color cells and etc.
 
  yes, with package xlsx you can colourize you data sheets, even the
  fonts. See for example ?CellStyle .
 
  A good demonstration of the capabilities is on
 
 
 http://tradeblotter.wordpress.com/2013/05/02/writing-from-r-to-excel-with-xlsx/
 
 
  My question would be that is it possible to color only some part of the
  data hold in a cell. Let's assume I've got the following data :
  167,153,120,100 and I want to color to red everything that is bigger
 then
  120. How can I achive this using R.
 
  Example file setup with a few lines in attachment. (SEL_MASS column can
  be
  used for example)
 
  Attachment missing ...
 
  HTH,
  Rainer
 
 
  Thank you in advance,
 
 
 -
  - László-András Zsurzsa,
  -
  - Msc. Infromatics, Technical University Munich, Germany -
  - Scientific Employee, TUM
 -
 
 
 -
 
 
[[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.
 


[[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.


Re: [R] Help R

2013-08-29 Thread Zsurzsa Laszlo
Do you have NA/NAN in your data set? If yes our check with an IF or
substitute them with a value that fits your need.

I hope I understood correctly your problem.

-
- László-András Zsurzsa,-
- Msc. Infromatics, Technical University Munich, Germany -
- Scientific Employee, TUM -
-


On Thu, Aug 29, 2013 at 3:49 PM, Mª Teresa Martinez Soriano 
teresama...@hotmail.com wrote:

 Hi to everyone,

 I would like to replace some values in a data.frame (D)

  str(D)
 'data.frame':   116 obs. of  10 variables:
  $ X. : int  1108 1591 3408 3872 5823 8099 10640 12600 14680 14698 ...
  $ media  : num  22 86.6 807 103.2 73 ...
  $ IE.2003: num  32 92 166 237 161 ...
  $ IE.2004: num  63 122.8 290 117.8 73.6 ...
  $ IE.2005: num  60 277 302 154 134 ...
  $ IE.2006: num  39 87 322 113 70 ...
  $ IE.2007: num  4 95 621 116 80 ...
  $ IE.2008: num  8 94 1071 90 74 ...
  $ IE.2009: num  16 81 1301 94 69 ...
  $ IE.2010: num  5 76 1225 1911 72 ...

 D

 X.  media IE.2003 IE.2004 IE.2005 IE.2006 IE.2007 IE.2008 IE.2009
 IE.2010
 1   1108   22.032.063.060.0  39 4.0   8
  16 5.0
 2   1591   86.692.0   122.8   276.6  8795.0  94
  8176.0
 3   3408  807.0   166.0   290.0   302.0 322   621.01071
  1301  1225.0
 4   3872  103.25000   237.2   117.8   154.4 113   116.0  90
  94  1911.2
 5   5823   73.0   160.673.6   133.6  7080.0  74
  6972.0
 6   8099  125.16667   169.0   206.0   196.0 161   150.0  94
  7278.0
 7  10640   67.3   494.8   168.2   424.8 476   670.6  74
  7751.0
 8  12600 2417.0  1958.0  1871.0  1960.02383  2453.02506
  2758  2442.0
 9  14680   38.0   142.246.030.0  61   404.0  42
  19   243.8
 10 14698  698.16667   505.0   482.0   553.0 664   847.0 800
 679   646.0



 WHat I really want to do is:

  for( i in 1: nrow(D))
  {
for( j in 5:ncol(D))
{
 D[((D[i,j]/D[i,2])1.5)]15999)]-100
}

  }






 Error en `[-.data.frame`(`*tmp*`, (D[i, j] 15999), value = 1e+06) :
   missing values are not allowed in subscripted assignments of data frames
 [[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.


[[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.


Re: [R] R Language Newbie

2013-08-28 Thread Zsurzsa Laszlo
Can you specify you're task? I don't understand totally what you need to
do?  You're already getting odd numbers with :  seq(1,100,by=2)

-
- László-András Zsurzsa,-
- Msc. Infromatics, Technical University Munich, Germany -
- Scientific Employee, TUM -
-


On Wed, Aug 28, 2013 at 12:18 AM, arun smartpink...@yahoo.com wrote:

 Hi,
 set.seed(29)

 myVector- rnorm(100)
  seq(1,100,by=2)
 # [1]  1  3  5  7  9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43
 45 47 49
 #[26] 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95
 97 99


 myVector[seq(1,100,by=2)]


 rev(myVector)

  sum(myVector0)
 #[1] 46
 #or

  table(myVector0)
 #
 #FALSE  TRUE
  #  5446



 A.K.



 Hey guys, this is my first week taking R language courses and I'm having
 trouble with this assignment. I think I got the hang of it to an extent but
 was wondering if I could get help on one tiny part of my
 assignment.

 How can I get odd numbers from the vector I've created? To show
 you guys I've done the majority of my homework by myself I've included
 screenshots.

 __
 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.


[[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.


Re: [R] R Language Newbie

2013-08-28 Thread Zsurzsa Laszlo
Hello,

#3

myVector  - c(1:100)
oddVector - myVector[c(1:100) %% 2 == 1]

odd - myVector[c(1:100) %% 2 == 1]
identical( odd, seq(1,100,by=2)) gives me FALSE

#3

Is this what you suggested?

-
- László-András Zsurzsa,-
- Msc. Infromatics, Technical University Munich, Germany -
- Scientific Employee, TUM -
-


On Wed, Aug 28, 2013 at 2:17 PM, arun smartpink...@yahoo.com wrote:



 HI,

 I was talking about another method to get the same result:

  myVector[1:100%%2==1]


 identical(myVector[1:100%%2==1],myVector[seq(1,100,by=2)])
 #[1] TRUE

 Hope it helps.
 A.K.
 
 From: Zsurzsa Laszlo zsurzsalas...@gmail.com
 To: arun smartpink...@yahoo.com
 Cc: R help r-help@r-project.org
 Sent: Wednesday, August 28, 2013 5:21 AM
 Subject: Re: [R] R Language Newbie



 Can you specify you're task? I don't understand totally what you need to
 do?  You're already getting odd numbers with :  seq(1,100,by=2)

 --
 László-András Zsurzsa,-
 - Msc. Infromatics, Technical University Munich, Germany -
 - Scientific Employee, TUM -


 -


 On Wed, Aug 28, 2013 at 12:18 AM, arun smartpink...@yahoo.com wrote:

 Hi,
 set.seed(29)
 
 myVector- rnorm(100)
  seq(1,100,by=2)
 # [1]  1  3  5  7  9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43
 45 47 49
 #[26] 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93
 95 97 99
 
 
 myVector[seq(1,100,by=2)]
 
 
 rev(myVector)
 
  sum(myVector0)
 #[1] 46
 #or
 
  table(myVector0)
 #
 #FALSE  TRUE
  #  5446
 
 
 
 A.K.
 
 
 
 Hey guys, this is my first week taking R language courses and I'm having
 trouble with this assignment. I think I got the hang of it to an extent but
 was wondering if I could get help on one tiny part of my
 assignment.
 
 How can I get odd numbers from the vector I've created? To show
 you guys I've done the majority of my homework by myself I've included
 screenshots.
 
 __
 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.
 


[[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.


Re: [R] R Language Newbie

2013-08-28 Thread Zsurzsa Laszlo
Hey

Sure sorry for the mistake, That was i meant to be also. I this what you
were searching?

-
- László-András Zsurzsa,-
- Msc. Infromatics, Technical University Munich, Germany -
- Scientific Employee, TUM -
-


On Wed, Aug 28, 2013 at 3:03 PM, arun smartpink...@yahoo.com wrote:

 HI,
 'odd' and 'oddVector' are the same.


  identical(odd,oddVector)
 #[1] TRUE
  identical(odd,myVector[seq(1,100,by=2)])  myVector#
 #[1] TRUE

 A.K.

 
 From: Zsurzsa Laszlo zsurzsalas...@gmail.com
 To: arun smartpink...@yahoo.com
 Cc: R help r-help@r-project.org
 Sent: Wednesday, August 28, 2013 8:58 AM
 Subject: Re: [R] R Language Newbie



 Hello,

 #3

 myVector  - c(1:100)

 oddVector - myVector[c(1:100) %% 2 == 1]

 odd - myVector[c(1:100) %% 2 == 1]

 identical( odd, seq(1,100,by=2)) gives me FALSE

 #3

 Is this what you suggested?



 -
 - László-András Zsurzsa,-
 - Msc. Infromatics, Technical University Munich, Germany -
 - Scientific Employee, TUM -


 -


 On Wed, Aug 28, 2013 at 2:17 PM, arun smartpink...@yahoo.com wrote:


 
 HI,
 
 I was talking about another method to get the same result:
 
  myVector[1:100%%2==1]
 
 
 identical(myVector[1:100%%2==1],myVector[seq(1,100,by=2)])
 #[1] TRUE
 
 Hope it helps.
 
 A.K.
 
 From: Zsurzsa Laszlo zsurzsalas...@gmail.com
 To: arun smartpink...@yahoo.com
 Cc: R help r-help@r-project.org
 Sent: Wednesday, August 28, 2013 5:21 AM
 Subject: Re: [R] R Language Newbie
 
 
 
 
 Can you specify you're task? I don't understand totally what you need to
 do?  You're already getting odd numbers with :  seq(1,100,by=2)
 
 --
 László-András Zsurzsa,-
 
 - Msc. Infromatics, Technical University Munich, Germany -
 - Scientific Employee, TUM -
 

 -
 
 
 On Wed, Aug 28, 2013 at 12:18 AM, arun smartpink...@yahoo.com wrote:
 
 Hi,
 set.seed(29)
 
 myVector- rnorm(100)
  seq(1,100,by=2)
 # [1]  1  3  5  7  9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43
 45 47 49
 #[26] 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93
 95 97 99
 
 
 myVector[seq(1,100,by=2)]
 
 
 rev(myVector)
 
  sum(myVector0)
 #[1] 46
 #or
 
  table(myVector0)
 #
 #FALSE  TRUE
  #  5446
 
 
 
 A.K.
 
 
 
 Hey guys, this is my first week taking R language courses and I'm having
 trouble with this assignment. I think I got the hang of it to an extent but
 was wondering if I could get help on one tiny part of my
 assignment.
 
 How can I get odd numbers from the vector I've created? To show
 you guys I've done the majority of my homework by myself I've included
 screenshots.
 
 __
 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.
 
 


[[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] PubChem Request Search Script

2013-08-27 Thread Zsurzsa Laszlo
Dear all,

The question would be:

   I would love to get information and match names of different chemistry
compounds. A compound looks like this.
Link: http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=2

The task is the following:

1. You input a name via R to the link, then a database searches a
similar or the same compound for you. (you autotype the name in the input
field left to the search button.)
2. parse the information that you get back. (This I can do already via
R)

Thank you for you're attention,

-
- László-András Zsurzsa,-
- Msc. Infromatics, Technical University Munich, Germany -
- Scientific Employee, TUM -
-

[[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] readLines() problem-error

2013-07-12 Thread Zsurzsa Laszlo
Hello everyone,

I have my program like this:


while (length(oneLine - readLines(con, n = 1, warn = FALSE))  0)  {
   # here I process the line I read
}


The problem is it gives me different output every time. I get a problem/
error like:

Closing unused connection (con). Sadly I can't provide the file because
it's ,ore then a GB.

Thank you in advance,
---
- László-András Zsurzsa,  -
- Msc. Infromatics, Technical University Munich, -
---

[[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.


Re: [R] Help with installing a .tar.gz package on windows

2013-07-08 Thread Zsurzsa Laszlo
have you checked the bit version !?

Which R do you use? 32 or 64 bit?


---
- László-András Zsurzsa,  -
- Msc. Infromatics, Technical University Munich, -
---


On Mon, Jul 8, 2013 at 2:15 AM, Lucy Leigh lucy.le...@newcastle.edu.auwrote:

 Hi,
 I have a source package that isn't available as a windows zip file. Can
 anyone explain to me how I can install this on my windows R platform?
 When I use the following code:
  install.packages(PReMiuM_3.0.21.tar.gz, type = source)


 I get this error message:



 * installing *source* package 'PReMiuM' ...
 ** libs

 *** arch - i386
 ERROR: compilation failed for package 'PReMiuM'
 * removing 'C:/Program Files/R/R-3.0.1/library/PReMiuM'
 Warning messages:
 1: running command 'C:/PROGRA~1/R/R-30~1.1/bin/x64/R CMD INSTALL -l
 C:\Program Files\R\R-3.0.1\library PReMiuM_3.0.21.tar.gz' had status
 1
 2: In install.packages(PReMiuM_3.0.21.tar.gz, type = source) :
   installation of package ‘PReMiuM_3.0.21.tar.gz’ had non-zero exit
 status
 

 Thanks for any help anyone can give me,
 Lucy

 __
 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.


[[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] String based chemical name identification

2013-07-03 Thread Zsurzsa Laszlo
The problem is the following:

I have two big databases one look like this:

  2-Methyl-4-trimethylsilyloxyoct-5-yne   Benzoic acid, methyl ester   Benzoic
acid, 2-methyl-, methyl ester   Acetic acid, phenylmethyl ester
 2,7-Dimethyl-4-trimethylsilyloxyoct-7-en-5-yne   etc.

The second one looks like this:

 Name: D-Tagatose 1,6-bisphosphate  Name: 1-Phosphatidyl-D-myo-inositol;:
1-Phosphatidyl-1D-myo-inositol;: 1-Phosphatidyl-myo-inositol;:
Phosphatidyl-1D-myo-inositol;: (3-Phosphatidyl)-1-D-inositol;:
1,2-Diacyl-sn-glycero-3-phosphoinositol;: Phosphatidylinositol  Name:
Androstenedione;: Androst-4-ene-3,17-dione;: 4-Androstene-3,17-dione  Name:
Spermine;: N,N'-Bis(3-aminopropyl)-1,4-butanediamine  Name: H+;: Hydron  Name:
3-Iodo-L-tyrosine  etc.

Both of them have more then 3000 lines. Matching their name by hand is not
an option because I don't know chemistry.

*Possible solution I came up with*:

Go through all the names of the first database and then try to match with
the other one. I'm using *regexec *and *strsplit *functions for the
matching. Basically I split the name into small chunks and try to get some
hit in the other database.

I can supply code If needed but I did not want to spam in the first mail.


Any solution is welcome! It can be in pseudo-cod also or in any type of
logical arguing. It does not matter.


Laszlo-Andras Zsurzsa

Msc. Informatics, Technical University Munchen

[[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.