Displaying 20 results from an estimated 200 matches similar to: "data formatting"
2013 Sep 06
2
Alignment of data sets
Hi all;
I have a data set with the format below:
Year, Day, Hour, Value
2010, 001, 0, 15.9
2010, 001, 1, 7.3
2010, 001, 2, 5.2
2010, 001, 3, 8.0
2010, 001, 4, 0.0
2010, 001, 5, 12.1
2010, 001, 6, 11.6
2010, 001, 7, 13.9
2010, 001, 8, 11.9
2010, 001, 9, 13.6
2010, 001, 10, 16.1
2010, 001, 11, 18.5
That should
2017 Sep 28
2
Searching for Enumerated Items using str_count() from the stringr package
Hi all,
I have a large number of text strings to search for enumerated items.
However, I am receiving this error message even though I thought that I
properly escaped the special character closed parenthesis:
> Count<-str_count(text3,keywords)
Error in stri_count_regex(string, pattern, opts_regex = opts(pattern)) :
Syntax error in regexp pattern. (U_REGEX_RULE_SYNTAX)
===
Here is
2013 Jun 11
1
Help needed in feature extraction from two input files
Hi,
Try this:
lines1<- readLines(textConnection("gene1 or1|1234 or3|56 or4|793
gene4 or2|347
gene5 or3|23 or7|123456789"))
lines2<-readLines(textConnection(">or1|1234
ATCGGATTCAGG
>or2|347
GAACCTATCGGGGGGGGAATTTATATATTTTA
>or3|56
ATCGGAGATATAACCAATC
>or3|23
AAAATTAACAAGAGAATAGACAAAAAAA
>or4|793
ATCTCTCTCCTCTCTCTCTAAAAA
>or7|123456789
2013 Sep 30
1
str_count counts the substring
I am trying to count the number of times a word occurs in a string.
and using str_count function from the package stringr. This function counts
the substrings as well.
Is there a way in which I can exclude the substring count and just take the
exact match.
Thanks in advance.
--
Thanks and Regards
Agrima Srivastava
-------------------------------------------------------------------------------
2013 Feb 12
3
reorganize data
Hi R users,
Wonder if somebody could give me help on how to reshape this type of data:
-----------------------------------------------------------------------------------------------------------------------
Date:10.09.19 Time:21:39:05 Lat:N62.37.18 Long:E018.07.32
0000-0010 | 28| 28
0010-0020| 302| 302
0020-0030| 42| 42
0030-0040| 2| 2
0040-0050| 1| 1
0060-0070| 1| 1
2017 Sep 28
0
Searching for Enumerated Items using str_count() from the stringr package
On 09/28/2017 10:25 PM, Dan Abner wrote:
> Hi all,
>
> I have a large number of text strings to search for enumerated items.
> However, I am receiving this error message even though I thought that I
> properly escaped the special character closed parenthesis:
>
>
>> Count<-str_count(text3,keywords)
> Error in stri_count_regex(string, pattern, opts_regex =
2009 Sep 25
2
synchronisation of time series data using interpolation
Readers,
I have data with different time stamps that I wish to plot (for example):
data set 1
time(hh:mm:ss),datum
01:00:00,500
01:00:15,600
01:00:30,750
01:00:45,720
01:01:00,700
01:01:15,725
01:01:30,640
01:01:45,710
data set 2
time,datum
01:00:12,20
01:01:01,55
01:01:55,22
The time interval in data set 1 does not change, but the time interval
in data set 2 does change, such that for a
2010 Oct 15
7
Problem with merging two zoo objects
Dear all, I have following 2 zoo objects. However when I try to merge those 2 objects into one, nothing is coming as intended. Please see below the objects as well as the merged object:
> dat11
V2 V3 V4 V5
2010-10-15 13:43:54 73.8 73.8 73.8 73.8
2010-10-15 13:44:15 73.8 73.8 73.8 73.8
2010-10-15 13:45:51 73.8 73.8 73.8 73.8
2010-10-15 13:46:21 73.8 73.8 73.8 73.8
2010 Jul 06
4
Adding two files into one and vlookup
I have two files with dates and prices in each. The number of rows in each of
them will differ. How do I create a new file which contains data from both
these files? Cbind and merge are not helpful. For cbind because the rows are
not the same replication occurs. Also if I have similar data how do I write
a vlookup kind of function? I am giving an example below:
Say Price1 file contains the
2013 Apr 10
2
grup function
Hello,
How can i mattch blanks within words, when i have more phrases?
c("Shangh i", "Hello here i am","h llo")
> gsub(" ","a",c("Shangh i", "Hello here i am","h llo"))
[1] "Shanghai" "Helloahereaiaam" "hallo"
I would like to have [1] "Shanghai" "Hello here
2007 Sep 12
1
warning upon automatic close of connection
I noticed that under R 2.6.0 there is a warning about closing the connection
in the code from this post:
https://stat.ethz.ch/pipermail/r-help/2007-September/140601.html
which is evidently related to the following from the NEWS file:
o Connections will be closed if there is no R object referring to
them. A warning is issued if this is done, either at garbage
collection or if all the
2018 May 23
2
Pasar palabras de una lista a una variable del dataframe
Muchas gracias Carlos,
Me da error al hacerlo. Mi variable donde quiero que localice las palabras
de la lista tiene más de una palabra, no se si puede ser por eso.
Gracias
El Mar, 22 de Mayo de 2018, 20:15, Carlos Ortega escribió:
> Hola,
>
> Aquí tienes un ejemplo (reproducible)...
>
> #-----------------------
>> # Generar nombres de mujer
>> library(randNames)
2018 Feb 07
4
Contar comas de una variable
Buenas tardes,
Necesito contar cuántas comas hay en cada celda. Los datos tienen esta
forma:
Pros Comas
Opinión 1 calidad, 1
Opinión 2 calidad, diseño, color, 3
Opinión 3 precio, accesibilidad, sienta bien, luminoso, 4
La variable Pros es la que tengo y la variable Comas es la
2014 Mar 05
1
[PATCH] Code coverage support proof of concept
Hello,
I submit a patch for review that implements code coverage tracing in
the R interpreter.
It records the lines that are actually executed and their associated
frequency for which srcref information is available.
I perfectly understands that this patch will not make its way inside R
as it is, that they are many concerns of stability, compatibility,
maintenance and so on.
I would like to have
2006 Jun 29
1
initializing table and filling it out
Hi everyone,
I'm writting a script that will open multiple files in a single folder and then will do some calculations to finally save everything in a big table.
So here is the pseudo code
#read all files in the given directory
myfiles <-list.files("c:\\myDir")
#initialize table
???
#loop through files
for(f in myfiles[-1]) {
netMat <-
2013 Mar 05
1
ggplot2: two time series with different dates in a single plot
Hi
Using the ggplot2 package, I would like to obtain a plot that contains two
time series that have data points on different dates.
For instance, one data frame looks like:
date1, value1
2010-01-05, 2921.74
2010-01-08, 2703.89
2010-01-14, 3594.21
2010-01-20, 3659.22
The other data frame looks like
date2, value2
2010-01-01, 285.85
2010-01-02, 229.20
2010-01-05, 333.91
2010-01-06, 338.27
2010 May 31
2
accessing a data frame with row names
Readers,
I have entered a file into r:
,column1,column2
row1,0.1,0.2
row2,0.3,0.4
using the command:
dataframe<-read.table("/path/to/file.csv",header=T,row.names=1)
When I try the command:
dataframe[,2]
I receive the response:
NULL
I was expecting:
row1 0.2
row2 0.4
What is my error with the syntax please?
Yours,
r251
mandriva2009
2007 Jan 04
2
importing timestamp data into R
I have a set of timestamp data that I have in a text file that I would like
to import into R for analysis.
The timestamps are formated as follows:
DT_1,DT_2
[2006/08/10 21:12:14 ],[2006/08/10 21:54:00 ]
[2006/08/10 20:42:00 ],[2006/08/10 22:48:00 ]
[2006/08/10 20:58:00 ],[2006/08/10 21:39:00 ]
[2006/08/04 12:15:24 ],[2006/08/04 12:20:00 ]
[2006/08/04 12:02:00 ],[2006/08/04 14:20:00 ]
I can get
2007 Dec 27
1
questions about plot.zoo
Hi,
I have been having very good results using plot.zoo to chart time series
data. But I have three questions about plot.zoo and I am wondering if anyone
knows the answers.
(1) when I tried to use semi-log scale, via log="y", R issued a warning,
although it looked like plot.zoo plotted in semi-log scale anyway:
Warning message:
In plot.xy(xy.coords(x, y), type = type, ...) :
2008 Dec 22
2
Matching
I understand this is an easy question, and have been playing around with grep
and the match function, but was hoping for a little incite:
I have one .csv with the following data:
names values
A 1
B 2
C 3
D 4
The second .csv is:
names
A
C
I am hoping to match all of the rows that appear in the second .csv, making
a new file that would look like this:
names values