Displaying 20 results from an estimated 35 matches for "datalines".
Did you mean:
dataline
2005 Oct 07
1
sscanf equivalent
I have a data file from which I need to read portions of
data but data location/quantity can change from file to file.
I wrote some code and have a working solution but it seems
wasteful to have to do it this way. Here's the contrived
incomplete code.
datalines <- readLines(datafile.pathname)
# marker will appear on line preceding and following
# actual data
offset.data <- grep("marker", datalines)
datalines <- NULL
# grab first column of each assoc dataline
data <- scan(datafile.pathname,
wh...
1999 Jan 04
1
Names of data frame columns in an apply
Hi,
[some background]
I have a dataset which describes a number of subjects doing a "scientific
discovery". That is, they have to discover the rules underlying a
particular domain. To do so, they have to set the levels of 5 variables
which leads to a certain outcome. To identify what kind of "experiments"
the subjects did, I want to combine these levels into one variable
2009 Dec 06
3
SAS "datalines" or "cards" statement equivalent in R?
Hi R Users,
Is there a equivalent command in R where I can read in raw data? For example
I'm looking for equivalent R code for following SAS code:
DATA survey;
INPUT id sex $ age inc r1 r2 r3 ;
DATALINES;
1 F 35 17 7 2 2
17 M 50 14 5 5 3
33 F 45 6 7 2 7
49 M 24 14 7 5 7
65 F 52 9 4 7 7
81 M 44 11 7 7 7
2 F 34 17 6 5 3
18 M 40 14 7 5 2
34 F 47 6 6 5 6
50 M 35 17 5 7 5
;
Any help would be highly appreciated,
Gary
[[alternative HTML version deleted]]
2011 Dec 03
2
Downloading tab separated data from internet
...g from the opening form
stn<-"03015795"
myurl<-paste("http://ida.water.usgs.gov/ida/available_records.cfm?sn=",stn,sep="")
mypage1 = readLines(myurl)
# Getting the start and end dates
mypattern = '<td align="center">([^<]*)</td>'
datalines = grep(mypattern, mypage1[124], value=TRUE)
getexpr = function(s,g)substring(s,g,g+attr(g,'match.length')-1)
gg = gregexpr(mypattern, datalines)
matches = mapply(getexpr,datalines,gg)
result = gsub(mypattern,'\\1',matches)
names(result)=NULL
mydates<-result[1:2]
I want to know h...
2004 Aug 06
0
Lost ogg sync using jspeex
Hi
I am getting lost ogg sync exception when I tried to decompress a speex stream. I am using the following program for both compressing as well as decompressing. I am just planning to test how jspeex works.
// File AudioCapture.java
import javax.sound.sampled.spi.*;
import javax.sound.sampled.*;
import org.xiph.speex.spi.*;
import java.util.*;
import java.net.*;
import java.io.*;
public
2004 Aug 06
0
Lost ogg sync using jspeex
Hi
I am getting lost ogg sync exception when I tried to decompress a speex stream. I am using the following program for both compressing as well as decomressing. I am just planning to test how jspeex works.
// File AudioCapture.java
import javax.sound.sampled.spi.*;
import javax.sound.sampled.*;
import org.xiph.speex.spi.*;
import java.util.*;
import java.net.*;
import java.io.*;
public
2004 Aug 06
0
Please Help, Lost ogg sync using jspeex
<HTML dir=ltr><HEAD></HEAD>
<BODY>
<DIV id=idOWAReplyText8852 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2><FONT face=Arial color=#000000 size=2>Hi</FONT></DIV></DIV>
<DIV dir=ltr>
<DIV dir=ltr>
<DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
2009 Sep 02
3
PRoblem with paste function
I am having trouble with paste function. I dont know how to proceed. I tried
many options but i failed miserably.
I am using a variable f1 to assign a string as below:
f1=dataLine[locAffyProbeID];
( the value of f1 is 244901_at )
Then I am using the paste function
paste("set @g1=", f1);
instead of getting set at g1=244901_at, I am getting set @g1=23.
I am not able to understand
2010 Oct 07
1
Forecasting with R/Need Help. Steps shown below with the imaginary data
1. This is an imaginary data on monthly outcomes of 2 years and I want to forecast the outcome for next 12 months of next year.
data Data1;
input Yr Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec;
datalines;
2008 12 13 12 14 13 12 11 15 10 12 12 12
2009 12 13 12 14 13 12 11 15 10 12 12 12
;
run;
I converted the above data into the below format to use it in R as it was giving error: asking to use only univariate time series.
data Data1;
input RR;
datalines;
12
14
17
15
13
15
15
14
15
14
16
15
15
18
1...
2009 Mar 02
2
[Fwd: RE: Mixing inputstreams.]
Thanks Ross,
So you think that I can just numerically add up the appropriate Bytes
from each of the streams? If that's so would we be better add first,
then to normalise after the additon, so the final byte size is the same
as the individual ones, what ever that may be.
-------- Original Message --------
Subject: RE: [Vorbis] Mixing inputstreams.
Date: Tue, 3 Mar 2009 01:12:35 +1300
2004 Aug 06
3
q about jspeex
Hi Marc,
thanks for the quick reply.
Marc Gimpel wrote:
> It would appear the the 'pcm2speex.read(frame, 0, frame.length)' is
> blocking which means that it is waiting for data from the underlying
> inputstream (i.e.AudioInputStream(t.input)). If it could read
> sufficient data it would transcode it. If it recieved an EOF, it
> should do some zero padding and then
2006 Jul 18
1
SpeexEncoder requires 320 samples to process a Frame, not 160
Hi guys
I have tried compiling this attached code, I made all the buffers 320, there is no trace of a 160 buffer, but I get a "
SpeexEncoder requires 320 samples to process a Frame, not 160" error.
Maybe there's something I'm missing, here's my code:
import java.io.IOException;
import java.io.FileOutputStream;
import java.io.File;
import
2004 Aug 06
3
Mixing audio
Is There any intension to deal with mixing two or more streams encoded with "speex".
Most voice wise applications (such as conference) need this feature.
Oded Rephael
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org'
2004 Aug 06
2
q about jspeex
Ulrich B. Staudinger wrote:
> Hi,
>
> i have:
>
> public void run(){
> try{
> System.out.println("Opening
> mic"); // AudioInput
> ai=new AudioInput(t);
> // ai.start();
> if(t.input==null){
> AudioFormat format = new
2009 Jul 11
3
Reading data entered within an R program
...the two approaches but
haven't found anything. Are there any particular advantages or
disadvantages to these two approaches? If you were teaching R beginners,
which would you present?
Thanks,
Bob
http://RforSASandSPSSusers.com
# R Program to Read Data Within a Program.
# Very similar to SAS datalines or cards statements,
# and SPSS BEGIN DATA / END DATA commands.
# This stores the data as one long text string.
mystring <-
"workshop,gender,q1,q2,q3,q4
01,1,f,1,1,5,1
02,2,f,2,1,4,1
03,1,f,2,2,4,3
04,2, ,3,1, ,3
05,1,m,4,5,2,4
06,2,m,5,4,5,5
07,1,m,5,3,4,4
08,2,m,4,5,5,5"
# The tex...
2008 Feb 19
2
one-way anova power calculations
...of variance power calculation
groups = 4
n = 20
between.var = 10.5
within.var = 9
sig.level = 0.05
power = 1
NOTE: n is number in each group
I've already done the calculation in SAS with the following code:
data Dep;
Input cue $ mean weight;
datalines;
A 17.5 1
B 19 1
C 25 1
D 20.5 1
;
proc glmpower;
class cue;
model mean = cue;
weight weight;
power
stddev = 9
alpha = 0.05
ntotal= 80
power = .;
run;
This produces a power of 0.616 which is the answer I was supposed to get.
Any idea what I need to change?
Will
[[altern...
2004 Aug 06
0
q about jspeex
Hi,
i have:
public void run(){
try{
System.out.println("Opening mic");
// AudioInput ai=new AudioInput(t);
// ai.start();
if(t.input==null){
AudioFormat format = new
AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 44100, 16, 2, 4, 44100, false);
2004 Aug 06
0
JSpeex help
I am not sure if this is right place to ask for help on jspeex or can some one suggest. I have tried on jspeex sourceforge.net page.
I am trying to use Pcm2SpeexAudioInputStream by creating it from tdl which received pcm_signed audio data as follows:
AudioFormat format = new AudioFormat (AudioFormat.Encoding.PCM_SIGNED, 8000, 16, 1, 2, 8000, true);
DataLine.Info targetInfo = new DataLine.Info
2011 Oct 27
1
Proc Mixed to R
...follows:
66 subjects (colonies) treated with a random treatment (1-8) and measured at
three time points.
The data structure looks like:
input colony tmt y1 y2 y3;
y=y1; date=*1*; output;
y=y2; date=*2*; output;
y=y3; date=*3*; output;
datalines;
1 3 6725 6750 925
2 8 6950 5800 11275
3 4 4200 6100 6475
Procedure:
*proc* *mixed* data=Nosema method=ml covtest;
class colony tmt;
model y=tmt date tmt*date / s;
repeated / type=un subje...
2010 Oct 07
1
auto.arima error
I am trying to use auto.arima to fit a univariate time series and do forecast.
This is an imaginary data on monthly outcomes of 2 years and I want to forecast the outcome for next 12 months of next year.
data Data1;
input RR;
datalines;
12
14
17
15
13
15
15
14
15
14
16
15
15
18
16
16
15
14
15
16
16
14
13
12
;
run;
I successfully took this data into R and used the auto.arima codes but am getting the following error:
fit <- auto.arima(Data1)
---------------------------------------------------------------------------------------...