Displaying 20 results from an estimated 2000 matches similar to: "Using cbind to combine data frames and preserve header/names"
2012 Nov 21
6
Scaling values 0-255 -> -1 , 1 - how can this be done?
I have a dataframe in which I have values 0-255, I wish to transpose them such that:
if value > 127.5 value = 1
if value < 127.5 value = -1
I did something similar using the "binarize" function of the biclust package, this transforms my dataframe to 0 and 1 values, but I wish
to use -1 and 1 and looking for a way in R to do this.
Brian
2010 Dec 17
4
How to arrange the data
Dear R helpers
I have one data as given below.
date value1 value2 value3
30-Nov-2010 100 40 61
25-Nov-2010 108 31 88
14-Sep-2010 11 180 56
I want the following output
date name amount
30-Nov-2010 value1
2011 May 05
3
Alter a line in a file.
Hi all R users
Ive got a file that contains diffrent settings in the manor of:
setting1="value1"
setting2="value2"
setting3="value3"
setting4="value4"
.
.
.
What I want to do is open the file and change the value of a specific
setting
like wanna change setting4="value4" -> setting4="value5" and then save the
file again.
2007 Feb 24
3
gsub: replacing a.*a if no occurence of b in .*
I am trying to read a number of XML files using xmlTreeParse(). Unfortunately,
some of them are malformed in a way that makes R crash. The problem is that
closing tags are sometimes repeated like this:
<tag>value1</tag><tag>value2</tag>some garbage</tag></tag><tag>value3</tag>
I want to preprocess the contents of the XML file using gsub() before
2006 Apr 06
1
reshape question
Hi,
I have a data fram like this:
date column1 column2 column3 value1 value2 value3
1-1 A B C 10 5 2
2-1 A B D 5 2 0
3-1 A B E 17 10 7
How can I reshape it to:
date column1 column2 column3 v x
1-1 A B C value1 10
1-1 A B C value2 5
1-1 A B C value3 2
2-1 A B D value1 5
2-1 A B D value2 2
2-1 A B D value3 0
3-1 A B E value1 17
3-1 A B E value2 10
3-1 A B E value3 7
Thx!
Regards,
Richard
2012 Mar 01
2
Rscript example
Hi there,
I am trying to find an example how to use Rscript
Let's suppose I want to pass 3 arguments (I don't want [options] and -e
[expressions] as described in help)
*on the command line
myRscript.R -arg1=value1 -arg2=value2 -arg3=value3
*In the script
#! /path/to/Rscript
args = commandArgs(TRUE);
>From what I see args is just a string, do I do things correctly ?
--
View this
2007 Jun 12
3
Read Windows-like .INI files into R data structure?
I need to process some datasets where the configuration information was
stored in .INI-like files, i.e., text files with sections like this:
[Section1]
var1=value1
var2=value2
[Section2]
A=value3
B=value4
...
>From Google and other searches I haven't found any package, or function
within a package, that reads .INI files into an R list, or other data
structure.
Any suggestions, or
2009 Sep 10
2
tranform a table?
hello everyone,
i'm new to R, so i hope you dont mind a fairly basic R question. we're
using R to manipulate the results of SQL queries and create an HTML output.
I'm starting with a table that looks essentially like this:
Name Field1 Field2
John value1 value2
Jane value3 value4
My table is stored as a dataframe. I'd like to efficiently produce an
2010 Mar 03
5
Matching rows in a Data set? I'm Stuck!!
Hi, I'm having (yet another) problem with R.
I have a few data sets that have this sort of format
dataset1
ID DATA
1234 value
2345 value
3456 value
dataset2
ID DATA
1111 value
2345 value
3333 value
What i really want to do is write an R script that says "if the ID of
dataset1 and 2 match (2nd row), print out that whole row into a new
dataset3". No idea how to do that though.
2020 Aug 14
2
TDB database commands (TDB used by SAMBA)
Background: FREEBSD 11.2 - SAMBA 4.10.15
Hello everyone,
Good evening/afternoon/morning.
I am trying to "reuse" the TDB database to my portal, where I want to store
basically 3 information:
IP address , Name, TimeStamp - where IP would be the KEY and
"NAME,TIMESTAMP" would be the VALUE.
I am using the tdbtool to insert/store data successfully (like the example
below)
2009 May 19
2
Feature request: "database show" from manager API
Hi,
In ASTDB, I've got a rather long list of entries like:
/FamilyA/Key1 Value1
/FamilyA/Key2 Value2
/FamilyA/Key3 Value3
...
Instead of sending several DBGet queries (and parsing every response), I'm
wondering if a single "database show" or "database show family" query could
be implemented.
Alternative if to use ssh ("asterisk -rx "database show
2012 Dec 10
3
splitting dataset based on variable and re-combining
I have a dataset and I wish to use two different models to predict. Both models are SVM. The reason for two different models is based
on the sex of the observation. I wish to be able to make predictions and have the results be in the same order as my original dataset. To
illustrate I will use iris:
# Take Iris and create a dataframe of just two Species, setosa and versicolor, shuffle them
2015 Oct 28
4
RFC: Supporting macros in LLVM debug info
Hi,
I would like to implement macro debug info support in LLVM.
Below you will find 4 parts:
1. Background on what does it mean to debug macros.
2. A brief explanation on how to represent macro debug info in DWARF 4.0.
3. The suggested design.
4. A full example: Source -> AST -> LLVM IR -> DWARF.
Feel free to skip first two parts if you think you know the background.
2011 Jul 27
3
Searching using prefixes
Hi guys
I'm trying to figure out how I can use probabilistic searching on a
given field within a document; I've written to the list about this
before, but haven't quite figured out what's required and, following a
little research, I think I understand what I need to do but I'd like a
clarification on this.
o We have a database of a number of documents, with fields: title,
2009 Aug 10
1
manipulating text to generate different formulas to use in nls()
Hello,
In doing a series of non-linear estimations of a function which is a sum of a varying number
of sinusoids, I would like to "autogenerate" the arguments needed by nls() depending on that
number.
For example, when there are two sinusoids:
> nls( y ~ mu + A1 * cos(2*pi*f1*x - P1) + A2 * cos(2*pi*f2*x - P2), data = some.xy.data,
start = list( mu=some.value0,
2012 Oct 10
2
reading in a (very simple) list from a file
Apologies - I feel this is a very simple thing to do yet I am failing
massively. I keep finding information about how to do much more complicated
things (usually on this mailing list!), which then fail when I try to apply
it to my simple task.
Anyway, all I want to do is read in a series of key-value pairs from a file.
I thought a list would be a good way to keep these, such that I could access
2007 Nov 23
1
what''s the best way to deal with class/inheritence
sorry to cross post to dev/users. -dev was not the best option ;-)
Hi
to all puppet masters:
functionnality I need is quite simple:
classes/
one .pp file per class, example: class mail-gateway { ...service/host/templates... definitions }
-> this should set all that''s needed to setup a given system "rôle" in the system (installing packages, config files with variables
2009 Jul 29
3
Newbie in R: Reading .txt files and storing the 'numbers' in a vector
Hello everybody,
I'm a newbie in R and just went through an introduction class recently.
Here's my problem.
I have 2 text files (.txt) with plain numbers ('doubles' for those who
know c++) ordered into 2 columns as below:
coordinate1 value1
coordinate2 value2
coordinate3 value3
... ...
coordinateN valueN
I would like to write a small programme in which i would:
1. take
2010 Feb 10
4
Readjusting the OUTPUT csv file
Dear R helpers
I have some variables say ABC, DEF, PQR, LMN and XYZ. I am choosing any three varaibles at random at a time for my analysis and name these files as input1.csv, input2.csv and input3.csv. So if I choose variables say ABC, DEF and PQR, I am passing the specifications of these variables to input1.csv, input2.csv and input3.csv respectively.
This means in another case even if I
2015 Nov 03
3
RFC: Supporting macros in LLVM debug info
> Do we really need to touch the AST? Or would it be reasonable to wire up the CGDebugInfo directly to the PPCallbacks, if it isn't already? (perhaps it is already wired up for other reasons?)
This sound as a good idea, I will check that approach.
PPCallbacks is only an interface, has nothing connected to it, but we will create a new class, which implement PPCallbacks, for macros. So we can