Displaying 20 results from an estimated 30000 matches similar to: "How do I separate elements of a vector by comma?"
2013 Dec 13
2
how do I separete coloumns by comma?
Hi every one,
I have a text file like this:
1 4 4 1 6 23
1 4 2 2 3 28
1 4 5 1 2 24
1 2 3 1 1 24
1 2 3 1 2 40
1 2 3 1 4 22
I want to separate columns by comma, like this:
1,4,4,1,6,23
1,4,2,2,3,28
1,4,5,1,2,24
1,2,3,1,1,24
1,2,3,1,2,40
1,2,3,1,4,22
I used this code:
2009 May 19
2
create string of comma-separated content of vector
Hi,
how do I create a string of the comma-separated content of a vector?
I've got the vector i with several numeric values as content:
>str(i)
num 99
and want to create a SQL statement to look like the following where
the part '(2, 4, 6, 7)' should be
the content of the vector i:
select * from [biomass_data$] where site_no in (2, 4, 6, 7)
Here my approach (which doesn't
2010 Oct 08
4
function using values separated by a comma
Hello,
I have a dataframe (tab separated file) which looks like the example below -
two values separated by a comma, and tab separation between each of these.
[,1] [,2] [,3] [ ,4]
[1,] 0,1 1,3 40,10 0,0
[2,] 20,5 4,2 10,40 10,0
[3,] 0,11 1,2 120,10 0,0
I would like to calculate the percentage of the smallest number separated by
the comma by:
1) summing the values e.g. for
2017 Nov 24
0
Fw: modified mankendal
Hi Elham,
The error message:
Error in if (S == 0) { : missing value where TRUE/FALSE needed
means that for at least one S, the value is missing. The best advice I
can give you is to load the data frame X1 as in your code above, and
try something like:
which.na<-function(x) return(which(is.na(x)))
sapply(X1,which.na)
You will then get a list of the positions of any NA values in X1.
Jim
On
2009 Sep 15
1
comma as decimal separator in xtable
Hello,
How can I make xtable print a comma as decimal separator? Setting
the option OutDec isn't enough for xtable:
library(xtable)
options(OutDec = ",")
x <- c(1.1, 1.2, 1.3)
y <- c(2.3, 2.2, 2.1)
d <- data.frame(x, y)
d
print(xtable(d))
Thanks!
Jakson Aquino
2001 Nov 22
2
comma as decimal separator in plots
Dear R list-members,
Is there any way to display numbers with comma as decimal
separator, i.e., "5,4" instead of "5.4", in plots (x and y
axis, expressions)?
Thanks for any suggestion,
Antonio
Olinto
-----------------------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2017 May 08
3
[Bug 2715] New: for more flexibility, please support a comma ',' separated list of patterns to add to/remove from the defaults
https://bugzilla.mindrot.org/show_bug.cgi?id=2715
Bug ID: 2715
Summary: for more flexibility, please support a comma ','
separated list of patterns to add to/remove from the
defaults
Product: Portable OpenSSH
Version: 7.5p1
Hardware: Other
OS: Linux
Status: NEW
2012 Aug 14
0
as.numeric and as.character with locale using comma as separator
Dear all,
summary:
My LC_NUMERIC is changed from C to de_DE by library (qtbase).
[which shouldn't happen according to the warning when setting it back
manually].
I posted an issue at their github repository, but maybe the behaviour is
a bit more of general interest.
However, if LC_NUMERIC is changed, as.character () uses the decimal
separator that belongs to LC_NUMERIC (and not options
2007 Dec 03
3
strsplit on comma, with a trailing comma in input
I have a comma-separated data file in which trailing commas sometimes occur.
I am using strsplit to extract the data from this file, and it seems great
except in cases with trailing comma characters.
The example below illustrates. What I'd like is to get a fourth element in
the answer, being an empty string just like the second element. Is there a
way I can express my patter (or perhaps
2002 Jan 19
2
comma as decimal separator in plots
Hi,
Some time ago I asked about how to use comma as decimal separator in plots
and Mr. Paul Murrell wrote:
-------
You could try something with axis() and chartr(), like ...
par(mfrow=c(2,1))
plot(1:10/11, rep(1, 10), main="Standard X-Axis")
plot(1:10/11, rep(1, 10), main="Customised X-Axis", axes=F)
axis(1, at=pretty(1:10/11),
2008 Sep 29
2
turning comma separated string from multiple choices into flags
Hello,
I use google docs' Forms to conduct surveys online. Multiple choices
questions are coded as comma separated values.
For example,
if the question is like:
1. What magazines do you currently subscribe to? (you can choose
multiple choices)
1) Fast Company
2) Havard Business Review
3) Business Week
4) The Economist
And if the subject chose 1) and 3), the data is coded as a cell in a
2009 Mar 14
2
gsub and regex to tidy comma-limited values
I am cleaning up comma-limited values, so that only one comma
separates each value. Using the example below, as much as I try with
regex, I can't remove the last comma. I hope to have a one-liner
solution, if possible.
gsub("^,*|,*$|(,)*", "\\1", ",,,apple,,orange,,,,,lemon,strawberry,,,,")
[1] "apple,orange,lemon,strawberry,"
2006 Feb 23
3
Decimal comma instead of decimal point (i18n issue)
Hello,
What is the easiest way which enables usage of decimal comma "," instead
of decimal point (".") . I would like to force all RoR views to display
float numbers with comma instead of decimal point and also to allow
insertion of float numbers with comma in forms.
Thanks in advance,
Karel
--
Posted via http://www.ruby-forum.com/.
2007 Sep 12
7
[Bug 1361] New: ssh should handle leading comma in authentication method list
http://bugzilla.mindrot.org/show_bug.cgi?id=1361
Summary: ssh should handle leading comma in authentication method
list
Product: Portable OpenSSH
Version: 4.7p1
Platform: ix86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: ssh
AssignedTo: bitbucket at
2009 Dec 08
4
Split comma separated list
Hi all,
I'm a beginner user of R. I am stuck at what I thought was a very obvious
problem, but surprisingly, I havent found any solution on the forum or
online till now.
My problem is simple. I have a file which has entries like the following:
#ID Value1 List_of_values
ID1 0.342 0.01,1.2,0,0.323,0.67
ID2 0.010 0.987,0.056,1.3,1.5,0.4
2005 Nov 13
1
selection of missing data
Hi i'm a french medical student,
i have some data that i import from excel. My colomn of the datafram
are the localisations of metastasis. If there is a metatsasis there is
the symbol "_". i want to exclude the row without metastasis wich
represent the NA data.
so, i wrote this
mela is the data fram
mela1=ifelse(mela[,c(11:12,14:21,23,24)]=="_",1,0) # selection of the
2011 Sep 17
1
Replacing matching values by related values
I am trying to replace values of a vector (consisting of 15 values) by a value that is related to a matching value in a dataset (consisting of 17 rows).
Here's an example
The vector:
v <- c(f,a,e,d,m,o,e,f,i,n,e,i,b,a,o)
The dataset's columns consist of the following values
d[,1] <- c(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q)
d[,2] <- 1:17
So I want to end up with a vector that
2012 Jan 04
1
subscript with comma
Hi,
I want to write a word with subscript in a graph. Unfortunately, the
subscript contains a comma, so all my trials didn't work and I didn't find
how to do it.
I want to write "sm" as normal text and "w,grass" in the subscript. Can
anybody help me?
And a more general question: I read the help to "plotmath", but I still
didn't understand, how it works.
2006 May 23
3
comma separated autocompletion, like in Google Bookmarks, GMail, ..
Hi list,
Hi all,
In Google Bookmark and GMail -f.ex.-, autocompletion would help you
enter multiple values in 1 field, separated by commas.
Is there such a solution available somewhere?
This is necessary for the acts_as_taggable plugin, to let people enter
many tags in one file
ex: "rails, ruby, plugin"
but with the help of some AJAX magic. Without it, people have no clue
about
2002 Jun 06
0
[Bug 266] New: Trailing comma in enum for 3.2.3p1
http://bugzilla.mindrot.org/show_bug.cgi?id=266
Summary: Trailing comma in enum for 3.2.3p1
Product: Portable OpenSSH
Version: -current
Platform: PPC
URL: ftp://ftp.thewrittenword.com/outgoing/pub/openssh-
3.2.3p1-2.patch
OS/Version: AIX
Status: NEW
Severity: normal
Priority: P2